← Back to all lessons
Class 12Algebra7:27Published 17 Jan 2025

Solving a System of Equations Using the Product of Two Matrices

Use a given matrix product that equals the identity to find an inverse, then solve a three-variable system of linear equations by the matrix method.

This lesson works through a complete board problem. We first multiply two given 3 by 3 matrices and find that their product is the identity, which proves each is the inverse of the other. We then notice the coefficient matrix of the system is the transpose of one of them, use the rule that the inverse of a transpose equals the transpose of the inverse, and finish by multiplying out to read off the values of x, y, and z.

What you'll learn

  • How a matrix product equal to the identity tells you the two matrices are inverses of each other
  • Writing a system of three equations in matrix form and solving it as x equals the inverse of the coefficient matrix times the constants
  • Using the rule that the inverse of a transpose is the transpose of the inverse to reuse a product you already have

Lesson chapters

0:00The problem and the system to solve
0:44Multiplying the two matrices entry by entry
2:42Writing the system as a matrix equation
3:43Inverse of a transpose equals transpose of the inverse
6:32Multiplying out to find x, y, and z

Lesson notes

This lesson solves a system of three linear equations in three unknowns using a supplied product of two matrices. We show the product is the identity, identify the inverse we need, and read off the solution.

The given product

We are given two matrices and asked to multiply them:

P=[112023324],Q=[201923612].P = \begin{bmatrix} 1 & -1 & 2 \\ 0 & 2 & -3 \\ 3 & -2 & 4 \end{bmatrix}, \qquad Q = \begin{bmatrix} -2 & 0 & 1 \\ 9 & 2 & -3 \\ 6 & 1 & -2 \end{bmatrix}.

The system to solve is

x+3z=9,x+2y2z=4,2x3y+4z=3.\begin{aligned} x + 3z &= 9, \\ -x + 2y - 2z &= 4, \\ 2x - 3y + 4z &= -3. \end{aligned}

Computing the product PQPQ

We multiply row by column. For example, the top-left entry is the first row of PP times the first column of QQ:

1(2)+(1)(9)+2(6)=29+12=1.1(-2) + (-1)(9) + 2(6) = -2 - 9 + 12 = 1.

The first row of PP against the second and third columns of QQ gives 00 and 00. Continuing this for every entry:

PQ=[100010001]=I.PQ = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = I.

Since PQ=IPQ = I, each matrix is the inverse of the other, so

P1=Q.P^{-1} = Q.

Writing the system in matrix form

The coefficient matrix of the system is

A=[103122234],X=[xyz],B=[943],A = \begin{bmatrix} 1 & 0 & 3 \\ -1 & 2 & -2 \\ 2 & -3 & 4 \end{bmatrix}, \qquad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \qquad B = \begin{bmatrix} 9 \\ 4 \\ -3 \end{bmatrix},

so the system is AX=BAX = B and therefore X=A1BX = A^{-1}B.

Spotting the transpose

Notice that AA is exactly the transpose of PP:

A=PT.A = P^{\mathsf T}.

Inverse of a transpose

We use the rule that the inverse of a transpose is the transpose of the inverse:

A1=(PT)1=(P1)T=QT.A^{-1} = \left(P^{\mathsf T}\right)^{-1} = \left(P^{-1}\right)^{\mathsf T} = Q^{\mathsf T}.

Taking the transpose of QQ:

QT=[296021132].Q^{\mathsf T} = \begin{bmatrix} -2 & 9 & 6 \\ 0 & 2 & 1 \\ 1 & -3 & -2 \end{bmatrix}.

Multiplying out for the solution

Now X=A1B=QTBX = A^{-1}B = Q^{\mathsf T}B:

[xyz]=[296021132][943].\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -2 & 9 & 6 \\ 0 & 2 & 1 \\ 1 & -3 & -2 \end{bmatrix} \begin{bmatrix} 9 \\ 4 \\ -3 \end{bmatrix}.

Multiplying row by column:

x=2(9)+9(4)+6(3)=18+3618=0,y=0(9)+2(4)+1(3)=0+83=5,z=1(9)+(3)(4)+(2)(3)=912+6=3.\begin{aligned} x &= -2(9) + 9(4) + 6(-3) = -18 + 36 - 18 = 0, \\ y &= 0(9) + 2(4) + 1(-3) = 0 + 8 - 3 = 5, \\ z &= 1(9) + (-3)(4) + (-2)(-3) = 9 - 12 + 6 = 3. \end{aligned}

So the solution is

x=0,y=5,z=3.x = 0, \quad y = 5, \quad z = 3.

Key takeaways

  • If the product of two square matrices is the identity, then each is the inverse of the other.
  • A system AX=BAX = B is solved by X=A1BX = A^{-1}B whenever AA is invertible.
  • The inverse of a transpose equals the transpose of the inverse, (AT)1=(A1)T\left(A^{\mathsf T}\right)^{-1} = \left(A^{-1}\right)^{\mathsf T}, which lets you reuse an inverse you already know.