Sunday, July 13, 2014

Solving by Gaussian Elimination

Solve the following system of equations.
5x + 4y – z = 0
10y – 3z = 11
z = 3

It's fairly easy to see how to proceed in this case. I'll just back-substitute the z-value from the third equation into the second equation, solve the result for y, and then plug z and y into the first equation and solve the result for x.

10y – 3(3) = 11
10y – 9 = 11
10y = 20
y = 2


5x + 4(2) – (3) = 0
5x + 8 – 3 = 0
5x + 5 = 0
5x = –5
x = –1

Then the solution is (x, y, z) = (–1, 2, 3).

The reason this system was easy to solve is that the system was "triangular"; this refers to the equations having the form of a triangle, because of the lower equations containing only the later variables.



The point is that, in this format, the system is simple to solve. And Gaussian elimination is the method we'll use to convert systems to this upper triangular form, using the row operations we learned when we did the addition method.

Solve the following systems of equation using Gauss-Jordan Elimination
–3x + 2y – 6z = 6
5x + 7y – 5z = 6
x + 4y – 2z = 8

No equation is solved for a variable, so I'll have to do the multiplication-and-addition thing to simplify this system. In order to keep track of my work, I'll write down each step as I go. But I'll do my computations on scratch paper. Here is how I did it:

The first thing to do is to get rid of the leading x-terms in two of the rows. For now, I'll just look at which rows will be easy to clear out; I can switch rows later to get the system into "upper triangular" form. There is no rule that says I have to use the x-term from the first row, and, in this case, I think it will be simpler to use the x-term from the third row, since its coefficient is simply"1". So I'll multiply the third row by 3, and add it to the first row. I do the computations on scratch paper:



...and then I write down the results:




(When we were solving two-variable systems, we could multiply a row, rewriting the system off to the side, and then add down. There is no space for this in a three-variable system, which is why we need the scratch paper.)

Warning: Since I didn't actually do anything to the third row, I copied it down, unchanged, into the new matrix of equations. I used the third row, but I didn't actually change it. Don't confuse "using" with "changing".

To get smaller numbers for coefficients, I'll multiply the first row by one-half:




Now I'll multiply the third row by –5 and add this to the second row. I do my work on scratch paper:



...and then I write down the results: Copyright © Elizabeth Stapel 2003-2011 All Rights Reserved



Now I can use the second row to clear out the y-term in the first row. I'll multiply the second row by –7 and add. First I do the scratch work:



...and then I write down the results:




I can tell what z is now, but, just to be thorough, I'll divide the first row by 43. Then I'll rearrange the rows to put them in upper-triangular form:




Now I can start the process of back-solving:

y – 7(1) = –4
y – 7 = –4
y = 3

x + 4(3) – 2(1) = 8
x + 12 – 2 = 8
x + 10 = 8
x = –2

Then the solution is (x, y, z) = (–2, 3, 1).

Note: There is nothing sacred about the steps I used in solving the above system; there was nothing special about how I solved this system. You could work in a different order or simplify different rows, and still come up with the correct answer. These systems are sufficiently complicated that there is unlikely to be one right way of computing the answer. So don't stress over "how did she know to do that next?", because there is no rule. I just did whatever struck my fancy; I did whatever seemed simplest or whatever came to mind first. Don't worry if you would have used completely different steps. As long as each step along the way is correct, you'll come up with the same answer.


        Gaussian Elimination Video Lesson


        Friday, July 4, 2014

        MATRIX

        A Matrix is an array of numbers:

        (This one has 2 Rows and 3 Columns)

        The Size of a matrix
        Matrices are often referred to by their sizes. The size of a matrix is given in the form of a dimension, much as a room might be referred to as "a ten-by-twelve room". The dimensions for a matrix are the rows and columns, rather than the width and length. For instance, consider the following matrix A:


        Since A has three rows and four columns, the size of A is 3 × 4 (pronounced as "three-by-four").


        Adding     - To add two matrices: add the numbers in the matching positions:



        These are the calculations:
        3+4=7
        8+0=8
        4+1=5
        6-9=-3

        The two matrices must be the same size, i.e. the rows must match in size, and the columns must match in size.
        Example: a matrix with 3 rows and 5 columns can be added to another matrix of 3 rows and 5 columns.

        But it could not be added to a matrix with 3 rows and 4 columns (the columns don't match in size)
        Negative
             - The negative of a matrix is also simple:


        These are the calculations:
        -(2)=-2
        -(-4)=+4
        -(7)=-7
        -(10)=-10
        Subtracting
             - To subtract two matrices: subtract the numbers in the matching positions:



        These are the calculations:
        3-4=-1
        8-0=8
        4-1=3
        6-(-9)=15

        Note: subtracting is actually defined as the addition of a negative matrix: A + (-B)
        Multiply by a Constant     - We can multiply a matrix by some value:



        These are the calculations:
        2×4=8
        2×0=0
        2×1=2
        2×-9=-18

        We call the constant a scalar, so officially this is called "scalar multiplication".
        Transposing     - To "transpose" a matrix, swap the rows and columns. We put a "T" in the top right-hand corner to mean transpose:




        Notation     - A matrix is usually shown by a capital letter (such as A, or B)

        Each entry (or "element") is shown by a lower case letter with a "subscript" of row,column:




        Rows and Columns
        So which is the row and which is the column?
        Rows go left-right
        Columns go up-down

        Example:
        B = 


        Here are some sample entries:

        b1,1 = 6 (the entry at row 1, column 1 is 6)

        b1,3 = 24 (the entry at row 1, column 3 is 24)

        b2,3 = 8 (the entry at row 2, column 3 is 8)

        Saturday, June 28, 2014

        What is Linear Algebra?

        Linear algebra is the study of linear sets of equations and their transformation properties. Linear algebra allows the analysis of rotations in space, least squares fitting, solution of coupled differential equations, determination of a circle passing through three given points, as well as many other problems in mathematics, physics, and engineering.

        Linear Equations
        - A linear equation is an equation for a straight line.

        These are all linear equations:
        y = 2x + 1 5x = 6 + 3y y/2 = 3 - x

        Example: y = 2x+1 is a linear equation:
        line on a graph
        The graph of y = 2x+1 is a straight line


        • When x increases, y increases twice as fast, hence 2x
        • When x is 0, y is already 1. Hence +1 is also needed
        • So: y = 2x + 1

        Here are some example values:
        x
        y = 2x + 1
        -1
        y = 2 × (-1) + 1 = -1
        0
        y = 2 × 0 + 1 = 1
        1
        y = 2 × 1 + 1 = 3
        2
        y = 2 × 2 + 1 = 5




        Saturday, June 21, 2014

        Wait for the lord; be strong, and let your heart take courage; wait for the Lord! To you, O Lord, I call; my rock, do not refuse to hear me... Hear the voice of my supplication, as I cry to you for help, as I lift up my hands towards your most holy sanctuary.

        Psalms 27:14-28:2