Sunday, June 12, 2011

3.2 – System Of Linear Equations

Are you aware that not all simultaneous equations have unique answers (that means, you can find the unknowns x, y or z absolutely)?

Let’s take a look at the equation below:
-3x – y + z = -1
If I give you just one equation up there, it is certain that you will not be able to find an absolute answer for x, y and z. In fact, you could substitute any value for x and y, and you get a value for z!. From here you could have guessed that equal amount of equations and unknowns are required for you to solve the problem. This means, if you have 2 unknowns, you need 2 equations to solve for x and y. If you have 3 unknowns x, y and z, the minimum amount of equations you need to solve the problem is 3, and etc. So now let me give you another 2 equations below:
-3x – y + z = -1
x + 4y – z = 3
-5x + 2y + z = 2

Are you able to solve these 3 equations simultaneously? Alright, you only have learnt 2 variables, so let me give you another example below:
2x + y = 1
4x + 2y = 3

If you tried solving it, you find out that it is not solvable. A certain amount of unknowns, expressed in the same amount of equations is what we called as a system of equations. It is linear when all the variables, x, y, z, w or so on are to the power of one. So this section, I’m going to teach you how to solve systems of linear equations with 3 variables, and also know how to identify whether a system of equations have unique solutions.


CONSISTENCY

When we talk about consistency of equations, we are actually trying to determine whether this system of linear equations have a unique solution, infinitely many solutions, or no solutions. Every system of linear equation (I’ll be using 3 variables only in this section) will have either one of the outcomes. Having a unique solution means that there is a definite value for x, y and z, and when x, y and z are not those values, the 3 equations will contradict one another. For example,
2x + z = 0
2x + y + 4z = 1
3x + y + 8z = 1

will be consistent with each other if and only if x, y and z are 3, 3 and –1 respectively. Any other value will be wrong. Now, if a system of linear equations don’t have a unique solution, it
has either infinitely many solutions, or no solution at all. Having infinitely many solutions means that for the terms x, y and z are all dependent on another variable, let’s call it t, and t can be ANY VALUE. For example,

3x + y – 2z = –4
x +2y + 3z = 11
3x – 4y –13z = –41


have answers x = 7t -  19, y = 37 – 11t and z = 5t respectively, and t can be any number. As of the example above (the one in blue), it has no solution, because any value of x, y and z will not be able to get any consistent answer.

To determine whether a system of solution has unique, infinitely many or no solution, we first need to represent them in the form of a matrix. Taking the blue example above, we have
image

From here, we will determine the determinant of the 3 × 3 matrix. If the determinant gives a non-zero value, then there IS a unique solution for x, y and z. But if the determinant value equals to zero, then we have a non-unique son, in which we have to find out whether x, y and z are linearly dependent of each other, or there just isn’t a solution for x, y and z. Try calculating the determinants of the blue, red and green example to verify whether it is so.

It can be quite hard to identify whether the system of equations are linearly dependent (infinitely many solutions) or inconsistent (no solution). Basically, when you only have 2 or 1 equation available for a system of 3 unknowns, that system of equations is definitely linearly dependent. Try checking out the green example. Take the 1st equation, subtract 3 times the 2nd equation, you get –5y – 11z = –37. Taking the 3rd equation, subtracting 3 times the 2nd equation, factoring out 2, you get the same equation –5y – 11z = –37! This means that you actually only have 2 equations for 3 unknowns, which tells that there is infinitely many solutions. To solve this system of equations, you simply let any variable be t, as long as it doesn't give you trouble. For this case, I'll use z = 5t. Substituting it back to any 2 equations, you will get the final answer (x, y, z) =  (7t - 19, 37 - 11t, 5t).

For a system with no solution, you need to find 2 equations which contradict with one another. Using the orange example, after multiplying 2 to the 1st equation, you get
4x + 2y = 2
4x + 2y = 3
and you are about to conclude that 2 = 3, which is a contradiction! This shows that the system of equations are inconsistent with one another.

Equations can get very complicated, and it is not easy to identify contradicting or same equations within the system of equations. But there is a faster way.



GAUSSIAN ELIMINATION

Before I introduce this method, I need to tell you that the system of 3 linear equations could be represented in an augmented matrix below:
image
The line separates the 3 × 3 matrix and the constants on the right hand side. This is the blue example I take from above. The aim of Gaussian Elimination is to represent the augmented matrix in the row-echelon form before we solve the equation. The row-echelon form of augmented matrices have the following characteristics:


1. The 1st non-zero entry of each row is 1 (which is called the “leading 1”).
2. Below each “leading 1” are all zeroes.
3. Each “leading 1” is placed one position to the right of the “leading 1” in the row above.
4. Any row consisting entirely zeroes (if there is) will be placed at the bottom of the matrix.

Confused? Look at the matrix below:
image
In human language, as long as you have a diagonal of 1’s slanting from left to right downwards, and there are 3 zeroes on the bottom left corner, then that is a row-echelon form. So if the last row has all zeroes, so be it, as long as that row is not placed in the middle or the top.

In order to transform the blue example above into the row-echelon form, we need to learn some elementary row operations. Let i, j, and k be the labels for the 1st, 2nd and 3rd row (I hope you are able to distinguish a ROW and a COLUMN by now), and c be a constant. There are 3 things we can do to the augmented matrix without altering the final outcome:

1. interchange rows i & j, denoted by Rij.
2. multiply a row with a number c, denoted by cRi.
3. add c times of row j to row i, denoted by cRj + Ri.

So to show you how to go about, let’s use the blue example:
image

First, I switched the first and 2nd row, so I’ve got a “leading 1” for my first row. Next, I try to add 3 times the 1st row to the 2nd row to get a zero in the front of the 2nd row, then divide by 11 so that I get the 2nd “leading 1”. Since the 1st and 2nd row are done, I now solve for the 3rd row, and so happen that the 3rd row has 3 zeroes on the left (which has to be at the bottom, remember?). Converting this augmented matrix back to the system of equations, I have:
image
which has a contradiction! Therefore there is no solution for this system of equations. Take note that there is a difference between no unique solution and no solution, and both mean very different things!

Now, try using Gaussian elimination on the red and green example. For the red one, you will get the last row z = –1. By using back substitution, you will solve for x and y easily. For the green one, you will eventually get the last row filled with all zeroes. Please do lots of exercises on Gaussian Elimination, as you don’t want to make stupid mistakes in exam.


CRAMER’S RULE

Consider a system of n equations in the n variable x1, x2, ..., xn, expressible in matrix form as AX = B, where A is an invertible matrix. Let A1 be the matrix obtained by replacing the ith column of A with the n × 1 matrix B, Then the solution to the system is given by
 
image

I suppose you don’t like definitions in alien language. Cramer’s rule is applicable for systems of linear equations which have unique solutions only (probably when you are not having your calculator with you). In human language, Cramer’s rule states that when you have 3 linear equations

a1x + b1y + c1z = d1
a2x + b2y + c2z = d2

a3x + b3y + c3z = d3

Your expression for x, y and z are
image

The expression for x, y and z are just fractions of 2 determinants. The bottom determinant in blue are the same for all 3 x, y and z, which is the one you use to determine whether a system of linear equations have unique solutions (notice that if the blue determinant is 0, you don’t get an answer!). The determinant on the top differs by substituting the coefficient of that variable with the d’s. For example, the coefficient of x are the a’s, so just substitute them with all the d’s. I highlighted the d’s for clarity.

Now, use the red example above and try solving it with Cramer’s rule. If you feel like freaking your Maths T teacher out, use this method in exam, and risk your marks. :P But as I said earlier, you can actually solve simultaneous equations with 3 variables using your calculator. So probably you will only use this method when asked.


Matrices aren’t really as easy as you thought, isn’t it?

No comments:

Post a Comment