System of Equations, Part 3

So now that you know about matrices, we can use them to add a third way to solve a system of equations. You will need to read my previous 3 posts on matrices if you are unfamiliar with how to multiply matrices.

In the last post on System of Equations, I looked at the system:

2x + 3y = 51
3x + 2y = 49

And in my last post on Matrices, I showed you how a 2×2 matrix of numbers and a 2×1 matrix of unknowns can be multiplied together to get a 2×1 matrix that looks suspiciously like the left sides of a system of equations. This is , in fact, true. If I form a matrix using the coefficients on the left side of the above system, I get a matrix which I will call A:

\[
{\textbf{A}}\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{cc}{2}&{3}\\{3}&{2}\end{array}}\right]
\]

Let me now define a matrix x (which is different from the single variable x which is in italics and not bold):

\[
{\textbf{x}}\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{c}{x}\\{y}\end{array}}\right]
\]

Now I will define a matrix b:

\[
{\textbf{b}}\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{c}{51}\\{49}\end{array}}\right]
\]

Now see what happens if I multiply A by x:

\[
{\textbf{A}}{\textbf{x}}\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{cc}{2}&{3}\\{3}&{2}\end{array}}\right]\times\left[{\begin{array}{c}{x}\\{y}\end{array}}\right]\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{c}{{2}{x}{+}{3}{y}}\\{{3}{x}{+}{2}{y}}\end{array}}\right]
\]

The rows of this result look just like the left side of our system of equations. And b is the right side. So the matrix equivalent of the system is

\[
\begin{array}{c}
{{\textbf{A}}{\textbf{x}}\hspace{0.33em}{=}\hspace{0.33em}{\textbf{b}}}\\
{\left[{\begin{array}{cc}{2}&{3}\\{3}&{2}\end{array}}\right]\left[{\begin{array}{c}{x}\\{y}\end{array}}\right]\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{c}{51}\\{49}\end{array}}\right]}
\end{array}
\]

This is easy to form directly. You just form A as the matrix of coefficients (with the unknowns in the same order in each equation), x is the matrix of unknowns, and b is the matrix of the numbers on the right sides. So how do we solve this?

From my last post, I defined the inverse of a matrix A as A-1. This is the matrix that if I multiply A by its inverse, I get the identity matrix which is the equivalent of “1” in scalar maths.

The process of isolating (solving) for variables in a matrix equation is exactly the same as for scalar equations: you do the same thing to both sides with the goal of having the unknowns by themselves on one side. So if I pre-multiply (remember, order of multiplication in matrix maths is important) both sides of our matrix equation by A-1, the left side is the identity matrix times x which is equal to just x. The right side multiplies out to form the solution.

As I said before, finding A-1 is beyond the scope of this set of posts. I will just tell you what it is. However, many modern calculators will do this for you, and you can also use the internet and search for “matrix inverse calculator”. It turns out that A-1 is:

\[
\left[{\begin{array}{cc}{\frac{{-}{2}}{5}}&{\frac{3}{5}}\\{\frac{3}{5}}&{\frac{{-}{2}}{5}}\end{array}}\right]
\]

So taking the matrix equation and pre-multiply both sides by A-1 gives

A-1Ax = A-1bIx = A-1bx = A-1b

\[
\left[{\begin{array}{cc}{\frac{{-}{2}}{5}}&{\frac{3}{5}}\\{\frac{3}{5}}&{\frac{{-}{2}}{5}}\end{array}}\right]\left[{\begin{array}{cc}{2}&{3}\\{3}&{2}\end{array}}\right]\left[{\begin{array}{c}{x}\\{y}\end{array}}\right]\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{cc}{\frac{{-}{2}}{5}}&{\frac{3}{5}}\\{\frac{3}{5}}&{\frac{{-}{2}}{5}}\end{array}}\right]\left[{\begin{array}{c}{51}\\{49}\end{array}}\right]
\] \[
\Longrightarrow\hspace{0.33em}\left[{\begin{array}{c}{x}\\{y}\end{array}}\right]\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{cc}{\frac{{-}{2}}{5}}&{\frac{3}{5}}\\{\frac{3}{5}}&{\frac{{-}{2}}{5}}\end{array}}\right]\left[{\begin{array}{c}{51}\\{49}\end{array}}\right]\hspace{0.33em}{=}\hspace{0.33em}\left[{\begin{array}{c}{9}\\{11}\end{array}}\right]
\]

Which is the same answer as before, x = 9 and y = 11.

This is a very powerful method for large systems of equations. Next time I will solve a system of 4 equations with 4 unknowns. For those of you who have done this manually, you will appreciate the ease matrix algebra provides.