Solve a system of linear equations using an inverse matrix.
Nancy plans to invest $10,500 into two different bonds to spread out her risk. The first bond has an annual return of 10%, and the second bond has an annual return of 6%. In order to receive an 8.5% return from the two bonds, how much should Nancy invest in each bond? What is the best method to solve this problem?
There are several ways we can solve this problem. As we have seen in previous sections, systems of equations and matrices are useful in solving real-world problems involving finance. After studying this section, we will have the tools to solve the bond problem using the inverse of a matrix.
Finding the Inverse of a Matrix
We know that the multiplicative inverse of a real number a is a−1, and aa−1=a−1a=(a1)a=1. For example, 2−1=21 and (21)2=1. The multiplicative inverse of a matrix is similar in concept, except that the product of matrix A and its inverse A−1 equals the identity matrix. The identity matrix is a square matrix containing ones down the main diagonal and zeros everywhere else. We identify identity matrices by In where n represents the dimension of the matrix. The equations below are the identity matrices for a 2×2 matrix and a 3×3 matrix, respectively.
I2=[1001]
I3=100010001
The identity matrix acts as a 1 in matrix algebra. For example, AI=IA=A.
A matrix that has a multiplicative inverse has the properties
AA−1=IA−1A=I
A matrix that has a multiplicative inverse is called an invertible matrix. Only a square matrix may have a multiplicative inverse, as the reversibility, AA−1=A−1A=I, is a requirement. Not all square matrices have an inverse, but if A is invertible, then A−1 is unique. We will look at two methods for finding the inverse of a 2×2 matrix and a third method that can be used on both 2×2 and 3×3 matrices.
A General Note: The Identity Matrix and Multiplicative Inverse
The identity matrix, In, is a square matrix containing ones down the main diagonal and zeros everywhere else.
I2=[1001]I3=1000100012×2 3×3
If A is an n×n matrix and B is an n×n matrix such that AB=BA=In, then B=A−1, the multiplicative inverse of a matrixA.
Example 1: Showing That the Identity Matrix Acts as a 1
Given matrix A, show that AI=IA=A.
A=[3−245]
Solution
Use matrix multiplication to show that the product of A and the identity is equal to the product of the identity and A.
Finding the Multiplicative Inverse Using Matrix Multiplication
We can now determine whether two matrices are inverses, but how would we find the inverse of a given matrix? Since we know that the product of a matrix and its inverse is the identity matrix, we can find the inverse of a matrix by setting up an equation using matrix multiplication.
Example 3: Finding the Multiplicative Inverse Using Matrix Multiplication
Use matrix multiplication to find the inverse of the given matrix.
A=[12−2−3]
Solution
For this method, we multiply A by a matrix containing unknown constants and set it equal to the identity.
[12−2−3][acbd]=[1001]
Find the product of the two matrices on the left side of the equal sign.
[12−2−3][acbd]=[1a−2c2a−3c1b−2d2b−3d]
Next, set up a system of equations with the entry in row 1, column 1 of the new matrix equal to the first entry of the identity, 1. Set the entry in row 2, column 1 of the new matrix equal to the corresponding entry of the identity, which is 0.
1a−2c=1R12a−3c=0R2
Using row operations, multiply and add as follows: (−2)R1+R2→R2. Add the equations, and solve for c.
1a−2c=10+1c=−2c=−2
Back-substitute to solve for a.
a−2(−2)=1a+4=1a=−3
Write another system of equations setting the entry in row 1, column 2 of the new matrix equal to the corresponding entry of the identity, 0. Set the entry in row 2, column 2 equal to the corresponding entry of the identity.
1b−2d=02b−3d=1R1R2
Using row operations, multiply and add as follows: (−2)R1+R2=R2. Add the two equations and solve for d.
1b−2d=0d=10+1d=1
Once more, back-substitute and solve for b.
b−2(1)=0b−2=0b=2
A−1=[−3−221]
Finding the Multiplicative Inverse by Augmenting with the Identity
Another way to find the multiplicative inverse is by augmenting with the identity. When matrix A is transformed into I, the augmented matrix I transforms into A−1.
For example, given
A=[2513]
augment A with the identity
[2513∣1001]
Perform row operations with the goal of turning A into the identity.
Switch row 1 and row 2.
[5231∣0110]
Multiply row 2 by −2 and add to row 1.
[1211∣−2110]
Multiply row 1 by −2 and add to row 2.
[101−1∣−251−2]
Add row 2 to row 1.
[100−1∣35−1−2]
Multiply row 2 by −1.
[1001∣3−5−12]
The matrix we have found is A−1.
A−1=[3−5−12]
Finding the Multiplicative Inverse of 2×2 Matrices Using a Formula
When we need to find the multiplicative inverse of a 2×2 matrix, we can use a special formula instead of using matrix multiplication or augmenting with the identity.
If A is a 2×2 matrix, such as
A=[acbd]
the multiplicative inverse of A is given by the formula
A−1=ad−bc1[d−c−ba]
where ad−bc=0. If ad−bc=0, then A has no inverse.
Example 4: Using the Formula to Find the Multiplicative Inverse of Matrix A
Use the formula to find the multiplicative inverse of
Example 5: Finding the Inverse of the Matrix, If It Exists
Find the inverse, if it exists, of the given matrix.
A=[3162]
Solution
We will use the method of augmenting with the identity.
[3163∣1001]
Switch row 1 and row 2.
[1336∣0110]
Multiply row 1 by −3 and add it to row 2.
[1020∣1−301]
There is nothing further we can do. The zeros in row 2 indicate that this matrix has no inverse.
Finding the Multiplicative Inverse of 3×3 Matrices
Unfortunately, we do not have a formula similar to the one for a 2×2 matrix to find the inverse of a 3×3 matrix. Instead, we will augment the original matrix with the identity matrix and use row operations to obtain the inverse.
Given a 3×3 matrix
A=232334111
augment A with the identity matrix
A∣I=232334111∣100010001
To begin, we write the augmented matrix with the identity on the right and A on the left. Performing elementary row operations so that the identity matrix appears on the left, we will obtain the inverse matrix on the right. We will find the inverse of this matrix in the next example.
How To: Given a 3×3 matrix, find the inverse
Write the original matrix augmented with the identity matrix on the right.
Use elementary row operations so that the identity appears on the left.
What is obtained on the right is the inverse of the original matrix.
Use matrix multiplication to show that AA−1=I and A−1A=I.
Example 6: Finding the Inverse of a 3 × 3 Matrix
Given the 3×3 matrix A, find the inverse.
A=232334111
Solution
Augment A with the identity matrix, and then begin row operations until the identity matrix replaces A. The matrix on the right will be the inverse of A.
Solving a System of Linear Equations Using the Inverse of a Matrix
Solving a system of linear equations using the inverse of a matrix requires the definition of two new matrices: X is the matrix representing the variables of the system, and B is the matrix representing the constants. Using matrix multiplication, we may define a system of equations with the same number of equations as variables as
AX=B
To solve a system of linear equations using an inverse matrix, let A be the coefficient matrix, let X be the variable matrix, and let B be the constant matrix. Thus, we want to solve a system AX=B. For example, look at the following system of equations.
a1x+b1y=c1a2x+b2y=c2
From this system, the coefficient matrix is
A=[a1a2b1b2]
The variable matrix is
X=[xy]
And the constant matrix is
B=[c1c2]
Then AX=B looks like
[a1a2b1b2][xy]=[c1c2]
Recall the discussion earlier in this section regarding multiplying a real number by its inverse, (2−1)2=(21)2=1. To solve a single linear equation ax=b for x, we would simply multiply both sides of the equation by the multiplicative inverse (reciprocal) of a. Thus,
The only difference between a solving a linear equation and a system of equations written in matrix form is that finding the inverse of a matrix is more complicated, and matrix multiplication is a longer process. However, the goal is the same—to isolate the variable.
We will investigate this idea in detail, but it is helpful to begin with a 2×2 system and then move on to a 3×3 system.
A General Note: Solving a System of Equations Using the Inverse of a Matrix
Given a system of equations, write the coefficient matrix A, the variable matrix X, and the constant matrix B. Then
AX=B
Multiply both sides by the inverse of A to obtain the solution.
(A−1)AX=(A−1)B[(A−1)A]X=(A−1)BIX=(A−1)BX=(A−1)B
Q & A
If the coefficient matrix does not have an inverse, does that mean the system has no solution?
No, if the coefficient matrix is not invertible, the system could be inconsistent and have no solution, or be dependent and have infinitely many solutions.
Example 7: Solving a 2 × 2 System Using the Inverse of a Matrix
Solve the given system of equations using the inverse of a matrix.
3x+8y=54x+11y=7
Solution
Write the system in terms of a coefficient matrix, a variable matrix, and a constant matrix.
A=[34811],X=[xy],B=[57]
Then
[34811][xy]=[57]
First, we need to calculate A−1. Using the formula to calculate the inverse of a 2 by 2 matrix, we have:
No, recall that matrix multiplication is not commutative, so A−1B=BA−1. Consider our steps for solving the matrix equation.
(A−1)AX=(A−1)B[(A−1)A]X=(A−1)BIX=(A−1)BX=(A−1)B
Notice in the first step we multiplied both sides of the equation by A−1, but the A−1 was to the left of A on the left side and to the left of B on the right side. Because matrix multiplication is not commutative, order matters.
Example 8: Solving a 3 × 3 System Using the Inverse of a Matrix
Solve the following system using the inverse of a matrix.
5x+15y+56z=35−4x−11y−41z=−26−x−3y−11z=−7
Solution
Write the equation AX=B.
5−4−115−11−356−41−11xyz=35−26−7
First, we will find the inverse of A by augmenting with the identity.
5−4−115−11−356−41−11∣100010001
Multiply row 1 by 51.
1−4−13−11−3556−41−11∣5100010001
Multiply row 1 by 4 and add to row 2.
10−131−3556519−11∣51540010001
Add row 1 to row 3.
10031055651951∣515451010001
Multiply row 2 by −3 and add to row 1.
100010−5151951∣−5115451−310001
Multiply row 3 by 5.
100010−515191∣−511541−310005
Multiply row 3 by 51 and add to row 1.
10001005191∣−2541−310105
Multiply row 3 by −519 and add to row 2.
100010001∣−2−31−3101−195
So,
A−1=−2−31−3101−195
Multiply both sides of the equation by A−1. We want A−1AX=A−1B:
How To: Given a system of equations, solve with matrix inverses using a calculator.
Save the coefficient matrix and the constant matrix as matrix variables [A] and [B].
Enter the multiplication into the calculator, calling up each matrix variable as needed.
If the coefficient matrix is invertible, the calculator will present the solution matrix; if the coefficient matrix is not invertible, the calculator will present an error message.
Example 9: Using a Calculator to Solve a System of Equations with Matrix Inverses
Solve the system of equations with matrix inverses using a calculator
2x+3y+z=323x+3y+z=−272x+4y+z=−2
Solution
On the matrix page of the calculator, enter the coefficient matrix as the matrix variable [A], and enter the constant matrix as the matrix variable [B].
[A]=232334111,[B]=32−27−2
On the home screen of the calculator, type in the multiplication to solve for X, calling up each matrix variable as needed.
[A]−1×[B]
Evaluate the expression.
−59−34252
Key Equations
Identity matrix for a 2×2 matrix
I2=[1001]
Identity matrix for a 3×3 matrix
I3=100010001
Multiplicative inverse of a 2×2 matrix
A−1=ad−bc1[d−c−ba], where ad−bc=0
Key Concepts
An identity matrix has the property AI=IA=A.
An invertible matrix has the property AA−1=A−1A=I.
Use matrix multiplication and the identity to find the inverse of a 2×2 matrix.
The multiplicative inverse can be found using a formula.
Another method of finding the inverse is by augmenting with the identity.
We can augment a 3×3 matrix with the identity on the right and use row operations to turn the original matrix into the identity, and the matrix on the right becomes the inverse.
Write the system of equations as AX=B, and multiply both sides by the inverse of A:A−1AX=A−1B.
We can also use a calculator to solve a system of equations with matrix inverses.
Glossary
identity matrix
a square matrix containing ones down the main diagonal and zeros everywhere else; it acts as a 1 in matrix algebra
multiplicative inverse of a matrix
a matrix that, when multiplied by the original, equals the identity matrix
Section Exercises
1. In a previous section, we showed that matrix multiplication is not commutative, that is, AB=BA in most cases. Can you explain why matrix multiplication is commutative for matrix inverses, that is, A−1A=AA−1?
2. Does every 2×2 matrix have an inverse? Explain why or why not. Explain what condition is necessary for an inverse to exist.
3. Can you explain whether a 2×2 matrix with an entire row of zeros can have an inverse?
4. Can a matrix with an entire column of zeros have an inverse? Explain why or why not.
5. Can a matrix with zeros on the diagonal have an inverse? If so, find an example. If not, prove why not. For simplicity, assume a 2×2 matrix.
In the following exercises, show that matrix A is the inverse of matrix B.
6. A=[1−101],B=[1101]
7. A=[1324],B=[−2231−21]
8. A=[4750],B=[05171−354]
9. A=[−2321−1],B=[−2−6−1−4]
10. A=1000111−11,B=2120011−1−111
11. A=141206329,B=41617−120−32−2−54
12. A=3158162112,B=361−67−184−26−22−615
For the following exercises, find the multiplicative inverse of each matrix, if it exists.
13. [31−29]
14. [−2321]
15. [−3972]
16. [−4−5−38]
17. [1212]
18. [0110]
19. [0.511.5−0.5]
20. 1−23010672
21. 041110−305
22. 1−3−224−4−11−5
23. 12495−2−367
24. 1−41−2843−122
25. 213161214171215181
26. 147258369
For the following exercises, solve the system using the inverse of a 2×2 matrix.
27. 5x−6y=−614x+3y=−2
28. 8x+4y=−1003x−4y=1
29. 3x−2y=6−x+5y=−2
30. 5x−4y=−54x+y=2.3
31. −3x−4y=912x+4y=−6
32. −2x+3y=103−x+5y=21
33. 58x−54y=52−58x+51y=107
34. 21x+51y=−4121x−53y=−49
For the following exercises, solve a system using the inverse of a 3×3
matrix.
35. 3x−2y+5z=215x+4y=37x−2y−5z=5
36. 4x+4y+4z=402x−3y+4z=−12−x+3y+4z=9
37. 6x−5y−z=31−x+2y+z=−63x+3y+2z=13
38. 6x−5y+2z=−42x+5y−z=122x+5y+z=12
39. 4x−2y+3z=−122x+2y−9z=336y−4z=1
40. 101x−51y+4z=2−4151x−20y+52z=−101103x+4y−103z=23
41. 21x−51y+51z=10031−43x−41y+21z=407−54x−21y+23z=41
42. 0.1x+0.2y+0.3z=−1.40.1x−0.2y+0.3z=0.60.4y+0.9z=−2
For the following exercises, use a calculator to solve the system of equations with matrix inverses.
43. 2x−y=−3−x+2y=2.3
44. −21x−23y=−204325x+511y=431
45. 12.3x−2y−2.5z=236.9x+7y−7.5z=−78y−5z=−10
46. 0.5x−3y+6z=−0.80.7x−2y=−0.060.5x+4y+5z=0
For the following exercises, find the inverse of the given matrix.
47. 1000011010110101
48. −1001002−320−105201
49. 101−5−214030−210231
50. 1000022020013012000230110
51. 100001010001001001000101000011000001
For the following exercises, write a system of equations that represents the situation. Then, solve the system using the inverse of a matrix.
52. 2,400 tickets were sold for a basketball game. If the prices for floor 1 and floor 2 were different, and the total amount of money brought in is $64,000, how much was the price of each ticket?
53. In the previous exercise, if you were told there were 400 more tickets sold for floor 2 than floor 1, how much was the price of each ticket?
54. A food drive collected two different types of canned goods, green beans and kidney beans. The total number of collected cans was 350 and the total weight of all donated food was 348 lb, 12 oz. If the green bean cans weigh 2 oz less than the kidney bean cans, how many of each can was donated?
55. Students were asked to bring their favorite fruit to class. 95% of the fruits consisted of banana, apple, and oranges. If oranges were twice as popular as bananas, and apples were 5% less popular than bananas, what are the percentages of each individual fruit?
56. A sorority held a bake sale to raise money and sold brownies and chocolate chip cookies. They priced the brownies at $1 and the chocolate chip cookies at $0.75. They raised $700 and sold 850 items. How many brownies and how many cookies were sold?
57. A clothing store needs to order new inventory. It has three different types of hats for sale: straw hats, beanies, and cowboy hats. The straw hat is priced at $13.99, the beanie at $7.99, and the cowboy hat at $14.49. If 100 hats were sold this past quarter, $1,119 was taken in by sales, and the amount of beanies sold was 10 more than cowboy hats, how many of each should the clothing store order to replace those already sold?
58. Anna, Ashley, and Andrea weigh a combined 370 lb. If Andrea weighs 20 lb more than Ashley, and Anna weighs 1.5 times as much as Ashley, how much does each girl weigh?
59. Three roommates shared a package of 12 ice cream bars, but no one remembers who ate how many. If Tom ate twice as many ice cream bars as Joe, and Albert ate three less than Tom, how many ice cream bars did each roommate eat?
60. A farmer constructed a chicken coop out of chicken wire, wood, and plywood. The chicken wire cost $2 per square foot, the wood $10 per square foot, and the plywood $5 per square foot. The farmer spent a total of $51, and the total amount of materials used was 14 ft2. He used 3 ft2 more chicken wire than plywood. How much of each material in did the farmer use?
61. Jay has lemon, orange, and pomegranate trees in his backyard. An orange weighs 8 oz, a lemon 5 oz, and a pomegranate 11 oz. Jay picked 142 pieces of fruit weighing a total of 70 lb, 10 oz. He picked 15.5 times more oranges than pomegranates. How many of each fruit did Jay pick?