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=[a1b1a2b2]

The variable matrix is

X=[xy]

And the constant matrix is

B=[c1c2]

Then AX=B looks like

[a1b1a2b2] [xy]=[c1c2]

Recall the discussion earlier in this section regarding multiplying a real number by its inverse, (21)2=(12)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,

 ax=b (1a)ax=(1a)b(a1 )ax=(a1)b[(a1)a]x=(a1)b 1x=(a1)b x=(a1)b

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.

(A1)AX=(A1)B[(A1)A]X=(A1)BIX=(A1)BX=(A1)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=[38411],X=[xy],B=[57]

Then

[38411] [xy]=[57]

First, we need to calculate A1. Using the formula to calculate the inverse of a 2 by 2 matrix, we have:

A1=1adbc[dbca] =13(11)8(4)[11843] =11[11843]

So,

A1=[1184  3]

Now we are ready to solve. Multiply both sides of the equation by A1.

(A1)AX=(A1)B[11843] [38411] [xy]=[11843] [57][1001] [xy]=[11(5)+(8)74(5)+3(7)][xy]=[11]

The solution is (1,1).

Q & A

Can we solve for X by finding the product BA1?

No, recall that matrix multiplication is not commutative, so A1BBA1. Consider our steps for solving the matrix equation.

(A1)AX=(A1)B[(A1)A]X=(A1)BIX=(A1)BX=(A1)B

Notice in the first step we multiplied both sides of the equation by A1, but the A1 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=354x11y41z=26x3y11z=7

Solution

Write the equation AX=B.

[51556411411311] [xyz]=[35267]

First, we will find the inverse of A by augmenting with the identity.

[51556411411311|100010001]

Multiply row 1 by 15.

[13565411411311|1500010001]

Multiply row 1 by 4 and add to row 2.

[13565011951311|15004510001]

Add row 1 to row 3.

[13565011950015|150045101501]

Multiply row 2 by −3 and add to row 1.

[1015011950015|1153045101501]

Multiply row 3 by 5.

[101501195001|115304510105]

Multiply row 3 by 15 and add to row 1.

[10001195001|2314510105]

Multiply row 3 by 195 and add to row 2.

[100010001|2313119105]

So,

A1=[2313119105]

Multiply both sides of the equation by A1. We want A1AX=A1B:

[2313119105] [51556411411311] [xyz]=[2313119105] [35267]

Thus,

A1B=[70+78710526+13335+035]=[120]

The solution is (1,2,0).

Try It 4

Solve the system using the inverse of the coefficient matrix.

 2x17y+11z=0 x+11y7z=8 3y2z=2

How To: Given a system of equations, solve with matrix inverses using a calculator.

  1. Save the coefficient matrix and the constant matrix as matrix variables [A] and [B].
  2. Enter the multiplication into the calculator, calling up each matrix variable as needed.
  3. 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]=[231331241], [B]=[32272]

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.

[5934252]