Explainer: Solving a System of Two Equations Using a Matrix Inverse

In this explainer, we will learn how to solve a system of two linear equations using the inverse of the matrix of coefficients.

The translation between systems and matrix equations is straightforward. Consider the system 2π‘₯+3π‘¦βˆ’2𝑧=5,βˆ’π‘₯βˆ’2𝑦+4𝑧=βˆ’2,π‘₯+2π‘¦βˆ’3𝑧=1.

We can check that the values π‘₯=12, 𝑦=βˆ’7, 𝑧=βˆ’1 solve this system by verifying that it produces identities 2(12)+3(βˆ’7)βˆ’2(βˆ’1)=24βˆ’21+2=5 and βˆ’(12)βˆ’2(βˆ’7)+4(βˆ’1)=βˆ’12+14βˆ’4=βˆ’2 and 12+2(βˆ’7)βˆ’3(βˆ’1)=12βˆ’14+3=1.

We can also write the system as an equation between two 3Γ—1 matrices: 2π‘₯+3π‘¦βˆ’2π‘§βˆ’π‘₯βˆ’2𝑦+4𝑧π‘₯+2π‘¦βˆ’3𝑧=5βˆ’21.

Then seeing the left matrix as a product of a 3Γ—3 matrix and a 3Γ—1 matrix separates the coefficients from the unknowns: 2π‘₯+3π‘¦βˆ’2π‘§βˆ’π‘₯βˆ’2𝑦+4𝑧π‘₯+2π‘¦βˆ’3𝑧=23βˆ’2βˆ’1βˆ’2412βˆ’3π‘₯𝑦𝑧.

In other words, we have expressed our system as the matrix equation 23βˆ’2βˆ’1βˆ’2412βˆ’3π‘₯𝑦𝑧=5βˆ’21 with the form 𝑀𝑋=𝑅, where 𝑀 is a 3Γ—3 matrix, while 𝑋 and 𝑅 are both 3Γ—1 matrices. Here, 𝑋 is the (matrix of) unknowns and 𝑅 the right-hand side of the equation, and this is exactly like the equation 2π‘₯=6, which has form π‘šπ‘₯=π‘Ÿ with numbers instead of matrices.

This is the simplest kind of linear equation and we know that provided the coefficient π‘š (here 2) is nonzero, we can solve this by multiplying the equation through by the multiplicative inverse of that coefficient: 2π‘₯=6 is the same as ο€Ή2βˆ’1(2π‘₯)=ο€Ή2βˆ’1(6)π‘₯=ο€Ό126=3.

We can use the same method here too. In the place of requiring that π‘šβ‰ 0 so that π‘šβˆ’1 exists, we demand that 𝑀 have an inverse matrix π‘€βˆ’1 so that π‘€βˆ’1⋅𝑀=𝐼, the 3Γ—3 identity matrix.

Now that we have 𝑀=23βˆ’2βˆ’1βˆ’2412βˆ’3,π‘€βˆ’1=2βˆ’5βˆ’8βˆ’146011, we continue to solve for 𝑋: 23βˆ’2βˆ’1βˆ’2412βˆ’3π‘₯𝑦𝑧=5βˆ’21 is the same as π‘€βˆ’123βˆ’2βˆ’1βˆ’2412βˆ’3π‘₯𝑦𝑧=π‘€βˆ’15βˆ’212βˆ’5βˆ’8βˆ’14601123βˆ’2βˆ’1βˆ’2412βˆ’3ο€ο‡Œο†²ο†²ο†²ο†²ο†²ο†²ο†²ο†²ο†²ο‡ο†²ο†²ο†²ο†²ο†²ο†²ο†²ο†²ο†²ο‡Žtheidentitymatrixπ‘₯𝑦𝑧=2βˆ’5βˆ’8βˆ’1460115βˆ’21π‘₯𝑦𝑧=(2)(5)+(βˆ’5)(βˆ’2)+(βˆ’8)(1)(βˆ’1)(5)+(4)(βˆ’2)+(6)(1)(0)(5)+(1)(βˆ’2)+(1)(1)=12βˆ’7βˆ’1, which gives the same solution, this time assembled into a 3Γ—1 matrix.

Example 1: Expressing a Set of Simultaneous Equations as a Matrix Equation

Express the given set of simultaneous equations as a matrix equation. 7π‘₯βˆ’3𝑦+6𝑧=5,5π‘₯βˆ’2𝑦+2𝑧=11,2π‘₯βˆ’3𝑦+8𝑧=10.

Answer

The important thing is to be sure that the system of equations has the unknowns in the same order for each equation. Then the coefficient matrix 𝑀 is easy to read off the matrix equation: 7βˆ’365βˆ’222βˆ’38π‘₯𝑦𝑧=51110.

Translating in the other direction is a similar exercise.

Example 2: Identifying a Set of Simultaneous Equations from a Matrix Equation

Write down the set of simultaneous equations that could be solved using the matrix equation 224βˆ’1βˆ’1βˆ’1256ο€ο˜π‘π‘žπ‘Ÿο€=41410.

Answer

Writing the three components of the matrix equation, we get the following system on unknowns 𝑝,π‘ž,π‘Ÿ: 2𝑝+2π‘ž+4π‘Ÿ=4,βˆ’π‘βˆ’π‘žβˆ’π‘Ÿ=14,2π‘βˆ’5π‘ž+6π‘Ÿ=10, which, of course, is the system of equations. As a list, it becomes 2𝑝+1π‘ž+4π‘Ÿ=4,βˆ’π‘βˆ’π‘žβˆ’π‘Ÿ=14,2π‘βˆ’5π‘ž+6π‘Ÿ=10.

Generally, the bulk of the work is in inverting the matrix.

Example 3: Solving a Matrix Equation by Finding the Inverse

Given that ο˜βˆ’1βˆ’6βˆ’60βˆ’2βˆ’4247π‘₯𝑦𝑧=ο˜βˆ’82βˆ’9, find the values of π‘₯,𝑦, and 𝑧.

Answer

Of course, the solution exists provided that the 3Γ—3 coefficient matrix above is invertible. This turns out to be the case, with ο˜βˆ’1βˆ’6βˆ’60βˆ’2βˆ’4247ο€βˆ’1=⎑⎒⎒⎒⎒⎒⎣111911611βˆ’411522βˆ’211211βˆ’411111⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯⎦ such that π‘₯𝑦𝑧=⎑⎒⎒⎒⎒⎒⎣111911611βˆ’411522βˆ’211211βˆ’411111⎀βŽ₯βŽ₯βŽ₯βŽ₯βŽ₯βŽ¦ο˜βˆ’82βˆ’9=ο˜βˆ’45βˆ’3.

Therefore, the system is solved by π‘₯=βˆ’4,𝑦=5,𝑧=βˆ’3.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.