CHAPTER 04.01 - 04.05: PRIMER ON SIMULTANEOUS LINEAR EQUATIONS: Setting up Equations in a Matrix Form
In this segment, we're going to talk about how do we set up equations . . . linear equations in matrix form. It might seem to be pretty simple for us to do it, and you might be doing it without thinking that how do we take certain equations and we put them in the matrix form, so it's very important for us to at least go through maybe an example, and see that how does it end up in the matrix form. So let's suppose somebody gives me three equations, so I'm going to write . . . show this through an example, so let's suppose somebody gives me three equations like this.
So 25 a1, plus 5 a2, plus a3 is equal to 106.8, 64 a1, plus 8 a2, plus a3 is equal to 177.2, and 144 a1, plus 12 a2, plus a3 is equal to 279.2. So what we want to be able to do is to be able to write down these three equations in the matrix form. Now, the first thing which I'm going to do is I'm going to write this, the left-hand side of the equations, I'm going to write them in a matrix, so I'm going to write it like this, 25 a1, plus 5 a2, plus 1 times a3, the reason why it's 1 is because the coefficient, of course, here is 1, so I'm going to write plus 1 times a3, so I've got 64 a1, plus 8 a2, plus 1 times a3 here, and then I've got 144 a1, plus 12 a2, plus 1 times a3. So, what I have basically done is that I have taken the left-hand side of these three equations, and I put them in a matrix, which is a three-rows, one-column matrix, and that means that if I'm going to put this in a matrix, then this has to be equal to another three-rows, one-column matrix. So it turns out to be 106.8, 177.2, 279.2. So here you are finding out that this particular matrix is same as this matrix, which implies that there has to be element-to-element equality, because it's a 3-by-1, and that's a 3-by-1, so that means that this has to be equal to this, this row has to be equal to this, and this row has to be equal to this, which is evident when you look at what you started as your equations from. Now here's the kicker, where you have to understand how do I now separate out the unknowns, which are a1, a2, and a3, as you must have seen time and again, is done by the basic concept of multiplication of matrices, by how you multiply two matrices, so it's not happening by magic, that when you write down this as a coefficient matrix multiplied by a solution vector, or the unknown vector as they may call it. So let's . . . let's carefully see that how we can rewrite the left-hand side, which is a 3-by-1 matrix, into a coefficient matrix, which is a 3-by-3 matrix, multiplied by unknown vector would be a 3-by-1 column. So let's go ahead and look at that, so what I want to do is I want to do something like this, I'm going to write now my 3-by-3 matrix, and I'm going to multiply it by a 3-by-1 matrix, so there . . . right here, it tells me that when I go and multiply a 3-by-3 matrix by a 3-by-1 matrix, I'm going to get a 3-by-1 column, or a . . . I'm going to just get a column . . . column array, or column matrix there. Now, I'm going to put 25 here, 5 here, 1 here, that's why I intentionally put down the coefficient . . . coefficients in the previous matrix, I get 64, 8, and 1 here, and I get 144 here, 12 here, and 1 here, and here I get a1, here I get a2, here I get a3, and the right-hand side will stay the same, which is 106.8, 177.2, and 279.2, which is also a 3-by-1 matrix. So this is a thing which you have to understand, that if I'm going to take a 3-by-3 matrix and multiply by a 3-by-1 matrix, it will result in a 3-by-1 matrix, that's how matrix multiplication works, and the way I'm going to find the 3-by-1 matrix is going to take the first row of this and multiply by the first column of that, and that will give me the first row, first column, and you can very well see that then I'm going to get 25 times a1, plus 5 times a2, plus 1 times a3 in the first . . . first row, and that's what my previous matrix looks like. Same thing here, if I want to find the second row, first . . . second row, first column of the resulting matrix here, I'll get 64, 8, and 1, they'll be multiplied by a1, a2, and a3 as a dot product, so I'll get 64 times a1, plus 8 times a2, plus 1 times a3 equal to 177.2. Same thing with the last row, I'll get 144 times a1, plus 12 times a2, plus a3 is equal to 279.2. So it's the matrix multiplication which is allowing us to write down the equation in this form.
So many times people will write this, hey, this is the A matrix, this is the, let's suppose the unknown array or the solution vector, and this is the right-hand side vector, and that's denoted by C. So this is nothing but called the coefficient matrix, and this one here will be called the solution vector, or some people call it the unknown vector or unknown array, and this one here is called the right-hand side vector, because it's on the right-hand side of the equation. So it might seem to be very trivial, what I have just shown you, that how you are converting a set of simultaneous linear equations into the matrix form, but you do need to understand what are the matrix operations, the basic matrix operations of addition, subtraction, multiplication, which allow you to write it in that particular form. And that's the end of this segment. |