topic badge
AustraliaVIC
VCE 11 General 2023

6.09 Simultaneous equations with matrices

Lesson

Introduction

Just as we have equations that we can solve using algebraic manipulation, we also have matrix equations we can solve using manipulation according to the laws of matrices.

We know that AA^{-1}=A^{-1}A=I where A^{-1} is the inverse of A and I is the identity matrix.

Division of matrices

Division for matrices is actually not defined, but this doesn't mean we can't manipulate equations. Anything that we would normally need to do using division, we instead do multiplication by using the inverse, provided the inverse of a matrix exists.

Because AA^{-1}=A^{-1}A we can use this property to simplify by carry out pre-multiplication and post-multiplication in equations instead of division. This is because we are aiming to multiply a matrix and its inverse to form the identity matrix.

For instance consider the matrix equation AX=B. To solve for X we need to pre-multiply. This means placing A^{-1} out the front of both sides of the equation.

\displaystyle AX\displaystyle =\displaystyle BWrite down the equation
\displaystyle A^{-1}AX\displaystyle =\displaystyle A^{-1}BPre-multiply both sides by A^{-1}
\displaystyle IX\displaystyle =\displaystyle A^{-1}BUse the fact that A^{-1}A=I
\displaystyle X\displaystyle =\displaystyle A^{-1}BUse the fact that IX=X

For the matrix equation XA=B, to solve for X we need to post-multiply. This means placing A^{-1} at the end of both sides of the equation.

XAA^{-1}=BA^{-1}. Here A^{-1} is post-multiplied on both sides.

\displaystyle XA\displaystyle =\displaystyle BWrite down the equation
\displaystyle XAA^{-1}\displaystyle =\displaystyle BA^{-1}Post-multiply both sides by A^{-1}
\displaystyle XI\displaystyle =\displaystyle BA^{-1}Use the fact that AA^{-1}=I
\displaystyle X\displaystyle =\displaystyle BA^{-1}Use the fact that XI=X

Examples

Example 1

A, B and C are matrices such that AB=C. Using matrix algebra, write the equations to solve for matrix B.

Worked Solution
Create a strategy

Eliminate matrix A from the left hand side of the equation by using pre-multiplication.

Apply the idea
\displaystyle A^{-1}AB\displaystyle =\displaystyle A^{-1}CMultiply both sides of the equation by the inverse of A
\displaystyle IB\displaystyle =\displaystyle A^{-1}CThe product of any matrix and its inverse results in the identity matrix
\displaystyle B\displaystyle =\displaystyle A^{-1}CThe product of any matrix and the identity matrix is the matrix itself

Example 2

A, B and C are matrices such that BA-C=0. Using matrix algebra, fill in the gaps to solve for matrix B.

Worked Solution
Create a strategy

Eliminate matrix C from the left hand side of the equation by using the property of additive inverse of a matix, and then eliminate matrix A from the left hand side of the equation by using post-multiplication.

Apply the idea
\displaystyle BA-C+C\displaystyle =\displaystyle 0+CPerform a reverse operation to eliminate matrix C
\displaystyle BA\displaystyle =\displaystyle CSimplify both sides of the equation
\displaystyle BAA^{-1}\displaystyle =\displaystyle CA^{-1}Multiply both sides of the equation by the inverse of A
\displaystyle BI\displaystyle =\displaystyle CA^{-1}The product of any matrix and its inverse results in the identity matrix
\displaystyle B\displaystyle =\displaystyle CA^{-1}The product of any matrix and the identity matrix is the matrix itself

Example 3

Let M= \begin{bmatrix} 7&-6\\ 5&-9 \end{bmatrix} and N= \begin{bmatrix} 1&7\\ 10&-3 \end{bmatrix}. Find X, if XM=N, in its most simplified form.

Worked Solution
Create a strategy

Perform matrix algebra to determine matrix X. Use the fact that the formula on the inverse of matrix is given by A^{-1}=\dfrac{1}{det(A)} \begin{bmatrix} a_{22}&-a_{12}\\ -a_{21}&a_{11} \end{bmatrix} , where matrix A=\begin{bmatrix} a_{11}&a_{12}\\ a_{21}&a_{22} \end{bmatrix}.

Apply the idea

To solve for X, we need to eliminate matrix Mon the left side of equation by post-multiplication.

\displaystyle XM\displaystyle =\displaystyle NWrite the equation
\displaystyle XMM^{-1}\displaystyle =\displaystyle NM^{-1}Post-multiply both sides by M^{-1}
\displaystyle XI\displaystyle =\displaystyle NM^{-1}Use the fact that MM^{-1}=I
\displaystyle X\displaystyle =\displaystyle NM^{-1}Use the fact that XI=X

To find M^{-1}, we use the formula on the inverse of matrix.

\displaystyle M^{-1}\displaystyle =\displaystyle \dfrac{1}{7 \times (-9) - \left(5\times -6\right)} \begin{bmatrix} -9&6\\ -5&7 \end{bmatrix} Substitute the values
\displaystyle =\displaystyle \dfrac{1}{-33} \begin{bmatrix} -9&6\\ -5&7 \end{bmatrix} Evaluate the denominator
\displaystyle =\displaystyle \begin{bmatrix} -9\times \dfrac{1}{-33}&6 \times \dfrac{1}{-33}\\ \\ -5\times \dfrac{1}{-33}&7 \times \dfrac{1}{-33}\\ \end{bmatrix} Multiply each element by \dfrac{1}{-33}
\displaystyle =\displaystyle \begin{bmatrix} \frac{3}{11}&\frac{-2}{11}\\ \\ \frac{5}{33}& \frac{-7}{33}\\ \end{bmatrix} Evaluate

Solving for X, we have

\displaystyle X\displaystyle =\displaystyle NM^{-1}
\displaystyle =\displaystyle \begin{bmatrix} 1&7\\ 10&-3 \end{bmatrix} \times \begin{bmatrix} \frac{3}{11}&\frac{-2}{11}\\ \\ \frac{5}{33}& \frac{-7}{33}\\ \end{bmatrix}Multiply matrix N by matrix M^{-1}
\displaystyle =\displaystyle \begin{bmatrix} \frac{4}{3} & \frac{-5}{3}\\ \\ \frac{25}{11} & \frac{-13}{11} \end{bmatrix}Evaluate
Idea summary

Since AA^{-1}=A^{-1}A we can use this property to simplify by carry out pre-multiplication and post-multiplication in equations instead of division. This is because we are aiming to multiply a matrix and its inverse to form the identity matrix.

Solve simultaneous equations using matrices

It is possible to solve simultaneous equations using matrices. Inverse matrices are the main tool that we use to do this.

Remember that simultaneous equations are two equations that when solved simultaneously (at the same time) provide a solution that is true for each of the equations. You will have already solved these using graphical and algebraic methods. Now we will use matrices.

First, represent the information using matrices.

Take this pair of equations.

\begin{cases} 2x + 3 y &= 16 \\ -3 x + y &= -13 \end{cases}

To write these using matrices split up the system into 3 parts.

  • a coefficient matrix (numbers in front of the pronumerals)

  • a variable matrix (also referred to as pronumerals)

  • an answer matrix (values on the other side of the equals sign)

\begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 16\\ -13\\ \end{bmatrix}

To verify that this matrix representation is indeed equivalent, let's expand the multiplication.

\begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 16\\ -13\\ \end{bmatrix}

By equating equivalent positions, the elements 2x+3y must equal 16, and -3x+y=-13.

Let's now look at how to solve it.

\begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} = \begin{bmatrix} 16\\ -13\\ \end{bmatrix}

For matrix equations, if MX=C, we can isolate matrix X, by pre-multiplying both sides by the inverse of M. Hence X=M^{-1}C.

Recall that when multiplying matrices, the order is important.

This means the inverse of \begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} is required.

We already know how to find the inverses:

If A= \begin{bmatrix} a&b\\ c&d \end{bmatrix} , then A^{-1}=\dfrac{1}{det(A)} \begin{bmatrix} d&-b\\ -c&a \end{bmatrix} so we have M= \begin{bmatrix} 2&3\\ -3&1 \end{bmatrix} then M^{-1}=\dfrac{1}{2-(-9)} \begin{bmatrix} 1&-3\\ 3&2 \end{bmatrix}.

\displaystyle \begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \begin{bmatrix} 16\\ -13\\ \end{bmatrix}
\displaystyle \dfrac{1}{11} \begin{bmatrix} 1&-3\\ 3&2\\ \end{bmatrix} \begin{bmatrix} 2&3\\ -3&1\\ \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \dfrac{1}{11} \begin{bmatrix} 1&-3\\ 3&2\\ \end{bmatrix} \begin{bmatrix} 16\\ -13\\ \end{bmatrix}
\displaystyle \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \dfrac{1}{11} \begin{bmatrix} 1\times 16 + \left(-3 \times-13\right)\\ 3\times 16 + 2\times \left(-13\right) \end{bmatrix}
\displaystyle \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \dfrac{1}{11} \begin{bmatrix} 16 +39\\ 48-26 \end{bmatrix}
\displaystyle \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \dfrac{1}{11} \begin{bmatrix} 55\\ 22 \end{bmatrix}
\displaystyle \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \begin{bmatrix} 5\\ 2 \end{bmatrix}

So this means that the solution to \begin{cases} 2x + 3 y &= 16 \\ -3 x + y &= -13 \end{cases} is x=5, and y=2. If graphing the two equations the intersection point would be (5,2).

Examples

Example 4

Given the following linear equations:\begin{aligned} 4 x + 6 y &= 23 \\ 8 x + 12 y &= 61 \end{aligned}

a

Express the system of equations in matrix form.

Worked Solution
Create a strategy

Write the system of linear equations in the matrix form AX=B where:

  • A is the coefficient matrix

  • X is the variable matrix

  • B is the right-hand side of the equations.

Apply the idea

Expressing the system of equations in matrix form, we have

\displaystyle \begin{bmatrix} 4&6\\ 8&12 \end{bmatrix} \times \begin{bmatrix} x\\ y \end{bmatrix} \displaystyle =\displaystyle \begin{bmatrix} 23\\ 61 \end{bmatrix}
b

Calculate the determinant of the coefficient matrix.

Worked Solution
Create a strategy

Get the difference between the products of the diagonals.

Apply the idea
\displaystyle \text{Determinant}\displaystyle =\displaystyle \begin{vmatrix} 4&6\\ 8&12 \end{vmatrix}
\displaystyle =\displaystyle 4\times 12-\left(8\times 6\right)Get the products of the diagonals.
\displaystyle =\displaystyle 48-48Evaluate the products
\displaystyle =\displaystyle 0Evaluate the subtraction
c

The determinant of the coefficient matrix is equal to zero. What can you conclude?

A
The coefficient matrix does not have an inverse and there are multiple solutions for the system of equations.
B
The coefficient matrix has an inverse and there are multiple solutions for the system of equations.
C
The coefficient matrix has an inverse and there are no solutions for the system of equations.
D
The coefficient matrix does not have an inverse and there is no solution for the system of equations.
Worked Solution
Create a strategy

Use the result found from part (b).

Apply the idea

By the definition of the inverse of a matrix, if det(A)=0, then \dfrac{1}{det(A)} is undefined.

Since the determinant found from part (b) is equal to 0, then this means that the coefficient matrix does not have an inverse and there is no solution for the system of equations. So, the correct answer is Option D.

Example 5

We have two numbers x and y, where x>y. Their sum is 42, while their difference is 16.

a

Write two equations that describe the relationship between x and y in the form ax+by=c. Write each equation on the same line, separated by a comma.

Worked Solution
Create a strategy

Translate the statements into equations. Use the fact that the sum of two numbers is the addition of these two numbers, and the difference of two numbers is the subtraction of two numbers.

Apply the idea

The systems of equations is given by:

\begin{cases} x + y &= 42 \\ x - y &= 16 \end{cases}

b

Express the system of equations in matrix form.

Worked Solution
Create a strategy

Write the system of linear equations in the matrix form AX=B where:

  • A is the coefficient matrix

  • X is the variable matrix

  • B is the right-hand side of the equations.

Apply the idea

Expressing the system of equations in matrix form, we have

\displaystyle \begin{bmatrix} 1&1\\ 1&-1 \end{bmatrix} \times \begin{bmatrix} x\\ y \end{bmatrix} \displaystyle =\displaystyle \begin{bmatrix} 42\\ 16 \end{bmatrix}
c

Calculate the determinant of the coefficient matrix.

Worked Solution
Create a strategy

Get the difference between the products of the diagonals.

Apply the idea
\displaystyle \text{Determinant}\displaystyle =\displaystyle \begin{vmatrix} 1&1\\ 1&-1 \end{vmatrix}
\displaystyle =\displaystyle \left(1\times -1\right)-1\times 1Get the products of the diagonals.
\displaystyle =\displaystyle -1-1Evaluate the products
\displaystyle =\displaystyle -2Evaluate the subtraction
d

Solve the system of equations using matrices.

Worked Solution
Create a strategy

Find the inverse of the coefficient matrix to solve a system of equations using matrices. Use the fact that solving AX=B using the inverse of A gives us X=A^{-1}B.

Apply the idea

Since the determinant from part (c) is -2, then \dfrac{1}{det(A)}=\dfrac{1}{-2}.

Solving for the systems of equations, we have

\displaystyle \begin{bmatrix} x\\ y \end{bmatrix}\displaystyle =\displaystyle \dfrac{1}{-2} \begin{bmatrix} -1&-1\\ -1&1 \end{bmatrix} \times \begin{bmatrix} 42\\ 16 \end{bmatrix}
\displaystyle =\displaystyle \dfrac{1}{-2} \begin{bmatrix} (-1\times 42) + (-1\times 16)\\ (-1\times 42) +(1\times 16) \end{bmatrix}Multiply matrix A by matrix B
\displaystyle =\displaystyle \dfrac{1}{-2} \begin{bmatrix} -58\\ -26 \end{bmatrix}Evaluate each element
\displaystyle =\displaystyle \dfrac{1}{-2} \begin{bmatrix} \dfrac{1}{-2}\times (-58)\\ \\ \dfrac{1}{-2} \times (-26) \end{bmatrix}Multiply each element by \dfrac{1}{-2}
\displaystyle =\displaystyle \begin{bmatrix} 29\\ 13 \end{bmatrix}Evaluate
Idea summary

To write the systems of equations using matrices, we split up the system into 3 parts:

  • a coefficient matrix (numbers in front of the pronumerals)

  • a variable matrix (also referred to as pronumerals)

  • an answer matrix (values on the other side of the equals sign)

Outcomes

U1.AoS3.4

determinant and inverse of a matrix

What is Mathspace

About Mathspace