One of the most important applications of matrices is to
finding the solution of a pair of simultaneous equations. So in
this video I'm going to show you how we can use matrices to do
just that. Let's look at this pair of simultaneous equations
here. X + 2 is four and three X -- 5 Y is 1.
Provided you understand how matrices are multiplied
together, you will be able to write these equations in what's
called matrix form. I'll show
you how. Supposing we write down the Matrix 1, two, 3 -- 5, and
we multiply it by another matrix XY. Let's just see how we can do
that. So we have a two by two matrix here and I formed it from
the coefficients of X&Y in the simultaneous equations 1, two, 3
-- 5. I've written this matrix here X&Y, which was which,
contains the unknowns in the
simultaneous equations. Now, provided you can understand how
to do matrix multiplication, you realize that these can be
multiplied together as follows. You pair the Elements 1, two
with XY and multiply the paired elements together and then add.
So it's 1 * X.
Which is X added to 2 * y which is 2 Y.
And you'll notice that X + 2 Y is the same as the quantity on
the left hand side of the first
equation. If we look at this second row here and multiply it
by the X and the Y 3 * X -- 5 * y.
And you'll see what we have
here. Is the left hand side of the second equation in the
simultaneous equations? And then we can write. This lot is equal
to 4, one which is a matrix formed by the right hand side
numbers in the simultaneous
equations. So you've really got the simultaneous equations
written down. In here you got X + 2 Y's four and three X -- 5 Y
is 1. So these are the original simultaneous equations, but in
matrix form. If we call this
matrix A. And this matrix of unknowns. Let's call
that capital X.
And this matrix on the right hand side. Let's call that B.
This form now have here is what we call the matrix form
of the simultaneous equations.
Let's think about which bits in this in this in this matrix
form. We know which bits we don't know. Well, the matrix A1,
two 3 -- 5 is known. It's just the matrix of coefficients of
X&Y in the original equations, the matrix be on the right is
this 141, which is just the matrix formed by the right hand
side of the simultaneous
equations. This quantity, capital X. This matrix here,
which stands for little X little. Y that's the unknown.
That's the thing we're trying to find, so this is the
matrix of unknowns.
So what we'd like to do is, like, we'd like to rearrange
this and get X equal to something, because then we've
got the solution of the simultaneous equations. We've
got the unknown on its on its own on the left hand side. Now
we can find this unknown matrix X the matrix of unknowns using
the inverse matrix. Let's see how we can do that.
So this is the matrix equation we want to solve. Now you might
be tempted to say if you want to find X, then X is B / A, but
remember there's no such thing as matrix division. You can't
divide matrix be by a matrix A and instead we make use of the
inverse matrix. What we'll do is we'll take this matrix form and
we multiply both sides of it by the inverse of matrix A. So I'm
going to take the left hand side and multiply it by the inverse.
Of a. And do the same to the right hand side.
So both sides of this equation have been multiplied by 8 to the
minus one. Now remember a very important property of inverse
matrices is that when you take A to the minus one and multiply it
by a, the result here.
Is an identity matrix, so ETA minus one A is an identity
matrix, so even identity matrix times X is A to the minus 1B.
And further property that you'll need to remember, which is very
important, is that if you take any matrix X and you multiply it
by an identity matrix, it leaves it identical to what it was
before, so the left hand side just simplifies this simply to
X. So we've come to the conclusion that if a X is B,
then the unknown X is the inverse of a * B. So this is the
important result that will need
to use. To solve a pair of simultaneous equations, what
will need to do is find the inverse of the matrix of
coefficients and multiply that by the matrix formed by the
elements by the numbers on the right hand side of the
simultaneous equations. So this is the formula will need will do
that in an example now.
So let's continue with this example. Here are the
simultaneous equations that we started with, and we've written
them in matrix form like this. That's in the form ax is B.
Well, this is the matrix. A
matrix of coefficients. This is the matrix Capital X, the matrix
of unknowns and B is the matrix formed by the elements on the
right hand side. What we need to do to solve this is we need to
find the inverse of a. So let's start by writing down the
inverse of this matrix here. Now remember that the formula for
the inverse matrix is as follows. 1 / a D minus BC.
That's 1 * -- 5, which is minus 5. Subtract VC's 2346.
We interchange the A and the D. So minus five will go up there
and one will go down there and we change the sign of the other
two elements. So this is the inverse of the matrix A.
Let's just tidy it up a little bit, minus 5 -- 6 is minus 11,
so we've got minus and 11th.
Of the matrix minus 5 -- 2 -- 3 and one and I'm going to leave
it in that form. I don't need to worry about taking the factor of
minus 1 / 11 inside.
Right, what we want to do now is find the matrix of unknowns X,
and remember that X is given by A to the minus 1 * B.
Eight of the minus one is now minus and 11th.
Times minus 5 -- 2 -- 3 one multiplied by
matrix B which was four
one. And you'll see that all we need to do now to finish this
off is debit of matrix multiplication. Let's leave the
minus 11 outside.
And over here we've got minus 5 * 4, which is minus 20 added to
minus 2 * 1. That's added to minus two, so you've got minus
22 there. And here pairing up this road with this column we've
got minus 3 * 4 is minus 12 added to 1 * 1, which is minus
12 model on which is minus 11.
Finally, just to finish this off, every element inside the
matrix has to be multiplied by minus in 11th or in other words
divided by minus 11. And if we do that, this first entry will
be minus 22 / -- 11, which is 2.
And the second element is minus 11 / -- 11, which is 1. So
that's the solution. This is the matrix X, which you'll remember
is the same as the matrix XY. This means that our little X is
2 and our little wise one, and that's the solution of the
simultaneous equations. Those are the solutions of the two
equations that we started with.
Rather than just leave it there like that, what you ought to do
to do is check that this solution is in fact correct by
substituting X is too. And why is 1 into these equations just
to check it's right. So for example, if you protect this
two in here, you'll get two and two ones are two there, two and
two is 4, so it satisfies the first equation. You should
check that it satisfies the second equation as well.