### Video Transcript

Use matrices to solve the system of equations π plus one equals two π, π equals π plus two.

Remember, given a pair of linear equations ππ₯ plus ππ¦ equals π and ππ₯ plus ππ¦ equals π, because of the way we multiply a pair of matrices, we can write this equivalently in matrix form as the matrix π, π, π, π times the matrix π₯, π¦ equals the matrix π, π. Then, if we let capital π΄ be the matrix π, π, π, π; capital π be the column matrix π₯, π¦; and capital π΅ be the column matrix π, π, we can multiply both sides of our equation by the inverse of matrix π΄ if it exists. And that gives us π is equal to the inverse of π΄ times π΅.

And so, this is how weβre going to solve our system of equations. Weβll begin by writing it in matrix form, and then weβll find the inverse of the matrix that we define to be equal to π΄. Once we have that, we can multiply it by matrix π΅, which will give us the matrix π. Before we do, though, letβs rearrange each of our equations so that the variables, in this case π and π, are all on one side. For our first equation, we subtract two π and we subtract one and we get π minus two π equals negative one. And for our second equation, weβre just going to subtract π. So, π minus π is equal to two.

And then, since weβre working with π and π instead of π₯ and π¦, we redefine our general form. So, ππ plus ππ equals π and ππ plus ππ equals π. π and π are, respectively, the coefficients of π and π in our first equation; thatβs one and negative two. Similarly, π and π are one and negative one. So, matrix π΄ is the matrix with elements one, negative two, one, negative one. The matrix π is the column matrix that contains our variables, so itβs simply ππ. Then, the matrix π΅ contains our constants; thatβs negative one, two.

Since the solution to our equation and the values then of π and π is given by multiplying the inverse of π΄ by π΅, itβs clear we have to find the inverse of π΄ first. Assuming the determinant of matrix π΄ is not equal to zero, then the inverse is one over the determinant of π΄ multiplied by the matrix whose elements are π, negative π, negative π, π, where the determinant is ππ minus ππ. In other words, the determinant is the product of the top left and bottom right minus the product of the top right and bottom left. And the inverse is found by multiplying one over the determinant of the matrix by the matrix containing elements where the top left and bottom right have switched and the signs of the remaining two have changed.

So, letβs begin by checking that the determinant of our matrix is not equal to zero. Itβs one times negative one minus negative two times one. Thatβs negative one plus two, which is one. So, the inverse of π΄ is one over the determinant of π΄, one over one. And then, we switch the elements in the top left and bottom right, so we switch one and negative one. And we change the sign of the remaining two. So, the inverse of π΄ is one over one times the matrix with elements negative one, two, negative one, one which is simply the matrix with elements negative one, two, negative one, one.

With this in mind, we can now substitute everything we know about our system of equations into the general form for the solution, π equals the inverse of π΄ times π΅. π is the matrix π, π. Weβve just found the inverse of π΄, and π΅ is the constant matrix negative one, two. Then, we multiply these matrices by finding the dot product of the elements on the first row of the first with the elements in the column of our second. Thatβs negative one times negative one plus two times two, which is equal to five. Then we repeat this, and we find the dot product of the elements in our second row with the elements in our column matrix. This time, thatβs negative one times negative one plus one times two, which is equal to three. And so, our matrix π, which has elements π, π, is five, three.

We could therefore say that the solution to our system of equations in alphabetical order is π equals three and π equals five. Or we could put the solutions back into matrix form, putting the π first since weβre working in alphabetical order. The matrix solution then is π, π equals three, five.