alg_notes_4_15

18
UNIVERSITY OF NEW SOUTH WALES SCHOOL OF MATHEMATICS MATH1131 Algebra Section 4: - Linear Equations and Matrices. Systems of Linear Equations: At School you learnt how to solve two-by-two systems of linear equations such as 2x + 3y =1 4x - 2y =2 You did this by multiplying the equations by various numbers and adding or subtracting so as to eliminate one of the unknowns. What does one do when faced with a system of 30 equations in 30 unknowns (such things turn up routinely in the applications of mathematics to the real world) ? Ad hoc manipula- tion of the equations is clearly out of the question. We need a SYSTEMATIC method for solving systems of linear equations in many vari- ables. This is provided by a method known as Gaussian Elimination. It is one of the absolute fundamentals of the algebra course and will be used constantly in MATH1231 as well as in this course. You will need to learn it carefully and get lots of practice at it. Before we look at this method, however, we wish to look carefully at the geometric interpretation of solving such systems. In 2-dimensions, solving a system of 2 simultaneous equations corresponds to looking at the intersection of two lines. The two lines may be parallel, in which case there is no in- tersection. They may meet at one point, in which case there will be one unique solution or they may in fact be the same line in which case there will be infinitely many solutions. In 3-dimensions, consider the following system of linear equations: x + y + z =6 x - y - z =0 Geometrically, we are looking at the intersection of two planes. Now two planes could be parallel, which would then mean that there are no solutions to this system. The two planes could be the same, in which case there are infinitely many solutions, all lying on that plane. The third possibility is that the two planes could meet in a line. 1

Upload: danielofhouselam

Post on 15-Sep-2015

215 views

Category:

Documents


3 download

DESCRIPTION

Maths

TRANSCRIPT

  • UNIVERSITY OF NEW SOUTH WALES

    SCHOOL OF MATHEMATICS MATH1131 Algebra

    Section 4: - Linear Equations and Matrices.

    Systems of Linear Equations:

    At School you learnt how to solve two-by-two systems of linear equations such as

    2x + 3y = 14x 2y = 2

    You did this by multiplying the equations by various numbers and adding or subtracting soas to eliminate one of the unknowns.

    What does one do when faced with a system of 30 equations in 30 unknowns (such thingsturn up routinely in the applications of mathematics to the real world) ? Ad hoc manipula-tion of the equations is clearly out of the question.

    We need a SYSTEMATIC method for solving systems of linear equations in many vari-ables.

    This is provided by a method known as Gaussian Elimination. It is one of the absolutefundamentals of the algebra course and will be used constantly in MATH1231 as well as inthis course. You will need to learn it carefully and get lots of practice at it. Before we lookat this method, however, we wish to look carefully at the geometric interpretation of solvingsuch systems.

    In 2-dimensions, solving a system of 2 simultaneous equations corresponds to looking atthe intersection of two lines. The two lines may be parallel, in which case there is no in-tersection. They may meet at one point, in which case there will be one unique solution orthey may in fact be the same line in which case there will be infinitely many solutions.

    In 3-dimensions, consider the following system of linear equations:

    x + y + z = 6x y z = 0

    Geometrically, we are looking at the intersection of two planes. Now two planes could beparallel, which would then mean that there are no solutions to this system. The two planescould be the same, in which case there are infinitely many solutions, all lying on that plane.The third possibility is that the two planes could meet in a line.

    1

  • In the above example,

    Observe that this is simply the equation of a line! Hence the two planes in our example meetin a line.

    Ex: Consider the following set of simultaneous equations.

    x + y + z = 7 2y z = 0

    3z = 12

    2

  • These represent three planes which intersect in a single point.

    This technique is called back-substitution.

    This last example was quite easy because at each stage we could solve the last equationand successively back substitute to solve the others. We are going to learn a procedure whichwill convert any set of equations into this or a similar form.

    Ex: Solvex + 2y + 3z = 62x + 4y + 6z = 11

    Ex: Solvex + 2y + 3z = 62x + 4y + 6z = 12

    These represent two planes which are in fact the same.

    Matrices:

    When we manipulate the equations, we are really only concerned with the co-efficients.The symbols x, y and z or x1, x2, x3 are simply place markers to separate off the co-efficients.We will therefore replace the equations with the co-efficients properly aligned. For examplethe system

    x + y + z = 6x y z = 0

    will be written as the block of numbers(1 1 1 61 1 1 0

    ).

    This is called an augmented matrix. The list consisting only of the co-efficients

    (1 1 11 1 1

    )

    3

  • is called a matrix. The word matrix (plural matrices) is Latin for womb. I suppose the ideawas that a developing fetus is stored in the womb, just as a matrix is used to store a blockof numbers.

    Ex: The augmented matrix of

    x + y + z = 7 2y z = 0

    3z = 12

    is

    An m n matrix then, is a block of numbers of the form

    a11 a12 a13 . . a1na21 a22 a23 . . a2na31 a32 a33 . . a3n. . . . . .. . . . . .. . . . . .

    am1 am2 a33 . . amn

    At this stage, we will think of these numbers as the co-efficients of the unknowns in someset of equations. (In the next topic we will look at matrices from a more general viewpoint.)

    An alternate way to write a system of equations is the so-called vector form.

    Ex: Write the following system of equations in augmented matrix and in vector form.

    x1 + 3x2 6x3 + 7x4 = 22x1 + 5x3 4x4 = 37x1 5x4 = 10

    4

  • The augmented matrix form is

    The vector form is

    If we write x for the vector

    x1x2x3x4

    in the above example, A for the matrix

    1 3 6 72 0 5 4

    7 0 0 5

    and b for the vector

    23

    10

    then the system of equations will be written briefly as Ax = b

    and the augmented matrix as (A|b). (Note that we have as yet not defined matrix multipli-cation, so Ax is purely a formal symbol.)

    Thus, the systema11x1 + a12x2 + + a1nxn = b1

    a21x1 + a22x2 + + a2nxn = b2...

    ... ...

    ...

    am1x1 + am2x2 + + amnxn = bm

    5

  • can be written as Ax = b with augmented matrix (A|b), written as

    a11 a12 a13 . . a1n b1a21 a22 a23 . . a2n b2a31 a32 a33 . . a3n b3. . . . . . .. . . . . . .. . . . . . .

    am1 am2 a33 . . amn bm

    Elementary Row Operations:

    Suppose we have our system of equations written in augmented matrix form. There area number of operations we can perform on the rows of the matrix without essentially al-tering the underlying set of equations. These operations will be called elementary rowoperations. We will describe these informally first, using examples, and then write themdown formally later.

    The systematic application of elementary row operations is called Gaussian elimination.

    The first such operation is to swap two rows. Note that this is simply the same as writingdown the equations in a different order.

    Ex: 2 1 1 11 1 1 4

    3 2 1 2

    R1R2

    1 1 1 42 1 1 1

    3 2 1 2

    Observe that this places a 1 in the top left-hand corner. This is very desirable. Given anyaugmented matrix, we swap the rows so as to have a non-zero number, preferably a 1 or 1in the top left-hand corner. A non-zero number in the top left hand corner is called a pivotand the column is referred to as a pivot column.

    The next operation involves subtracting a multiple of one row from another. This is preciselythe sort of thing you did back at school when using the elimination method. In our exampleI am going to subtract twice row 1 from row 2 to obtain

    1 1 1 42 1 1 1

    3 2 1 2

    R22R1

    1 1 1 40 3 1 9

    3 2 1 2

    Notice that this eliminates the x term from the second equation. Now we subtract threetimes row 1 from row 3 to obtain

    1 1 1 40 3 1 93 2 1 2

    R33R1

    1 1 1 40 3 1 9

    0 1 4 14

    6

  • Normally we would perform both of these operations in one go and write

    1 1 1 42 1 1 1

    3 2 1 2

    R22R1,R33R1

    1 1 1 40 3 1 9

    0 1 4 14

    Observe now that the variable x is absent from the second two equations. This process iscalled row reduction and is central to the Gaussian elimination method. We seek to reducethe co-efficients below the pivot to 0. We now move to the second line and observe that thefirst non-zero number in that row is 3. We could also call this a pivot element, but thereis a 1 below it. So we swap R2 and R3 to obtain

    1 1 1 40 3 1 90 1 4 14

    R2R3

    1 1 1 00 1 4 14

    0 3 1 9

    This makes 1 our new pivot and we use it to eliminate the 3 below by subtracting threetimes row 2 from row 3 to obtain

    1 1 1 40 1 4 140 3 1 9

    R33R2

    1 1 1 40 1 4 14

    0 0 11 33

    Finally observe that row 2 can be made a little simpler by multiplying by 1. Again thiswill not essentially change the underlying equations. Thus

    1 1 1 40 1 4 14

    0 0 11 33

    R2R2

    1 1 1 40 1 4 14

    0 0 11 33

    Note then, that at this stage, the underlying system of equations is

    x + y + z = 4y + 4z = 14

    11z = 33

    which is very easy to solve by back-substitution, giving z = 3, y = 2, x = 1.

    The final matrix we obtained is called the row echelon form of the matrix we startedwith. The first non-zero element in each row is called a pivot. We use row reduction toensure that each pivot has zeros below it.

    In any matrix, the leading row is any row which is not all zero. The leading entryin a leading row is the first non-zero element and the leading column is the column whichcontains that leading entry. We use the words leading and pivot interchangably.

    For example, in the matrix (0 5 70 0 0

    )

    7

  • the first row is a leading row and 5 is the leading entry. The second row is not a leading row.

    A matrix is in row echelon form if

    1. all rows of zeros are at the bottom.

    2. in any leading row, the leading entry is further to the right than the leading entry inany row higher up in the matrix.

    Note that this implies that the numbers below any leading entry must be zero. Here aresome examples:

    (2 5 70 0 4

    ),

    2 0 5 70 0 5 80 0 0 20 0 0 0

    The Gaussian Elimination method which we used to transform a matrix into row echelonform involved the following operations called elementary row operations.

    1. Swapping rows

    2. Multiplying (or dividing) any row by a constant.

    3. Adding or subtracting a multiple of one row from another.

    Given a matrix which we seek to row reduce, we go through the following steps.

    1. Move any zero rows to the bottom.

    2. Look down the first column and find a row with a non-zero element, preferably 1 or1, and make it the first row. The leading entry in that row is called the pivot. If the entirefirst column consists only of zeros then look to the second column and so on until you finda pivot. If the leading entry is not 1 or 1 then we can divide the row by this leading entryto make it 1. This will often introduce fractions. Alternately, you might be able to turn itinto 1 by subtracting (or adding) (some multiple of) another row.

    3. Eliminate (i.e. reduce to zero) all the non-zero entries below the pivot using the ele-mentary row operation 3.

    4. Repeat the process until the matrix is in row echelon form. Note that you may swaprows and divide any row by a common factor as you like. Try to avoid fractions as much aspossible by swapping rows.

    8

  • Ex: Row reduce the matrix: 0 2 3 3 54 2 1 2 1

    1 1 2 2 0

    Ex: Row reduce the matrix 2 4 1 33 3 1 2

    4 2 7 2

    9

  • Ex: Use Gaussian Elimination to solve the system of equations:

    a.

    x + y z = 02x + y + 3z = 23x + 2y + 4z = 16

    b.

    x1 + x2 x4 = 32x1 + 3x2 x3 x4 = 154x1 + 2x2 + 2x3 + x4 = 1

    10

  • Reduced Row Echelon Form:

    The reduced row echelon form of a matrix, is the row echelon form with the added propertythat there are zeros below and above the leading entries, and every leading entry is 1. Forexample:

    1 0 0 4 10 1 0 0 20 0 1 2 3

    To get a matrix into this form, we follow the same algorithm as before but we reduce (tozero) the entries above as well as below the leading entries and (at the end is easiest) divideeach leading row by the leading entry to make the leading entry equal to 1.

    Ex: Find the reduced row echelon form for 1 1 2 3 102 1 3 1 4

    3 1 4 2 5

    11

  • The Nature of the Solutions:

    The number of solutions, whether it be no solutions, infinitely many solutions or one (unique)solution, can be gleaned from the row echelon form without necessarily back-substituting.In many applications, (especially in MATH1231), we will be interested in whether a givensystem has solutions and if so whether the solution is unique or not, rather than in knowingprecisely what the solutions are.

    Compare the following row echelon forms of systems of equations.

    Ex: 2 4 1 30 5 5 2

    0 0 2 7

    We can see that we could solve for x3 uniquely, back-substitute to find x2 uniquely and thenback-substitute again to find x1 uniquely. Hence this system has a unique solution. Observethat every column is a leading column.

    Ex: 2 4 1 30 5 5 2

    0 0 0 7

    The bottom row says 0x3 = 7 which is clearly impossible, so this system has NO solution.Observe here that the right-hand column is a leading column.

    Ex: 2 4 1 30 5 5 2

    0 0 0 0

    In this case the bottom row consists only of zeros, so this equation gives no information.From the middle row, we see that we must introduce one parameter for x3, and so x2can then be determined in terms of and thus x1 can be determined in terms of . Thissystem has infinitely many solutions. Observe that column 3 is a non-leading column, andthat there will be 1 parameter in the solution.

    12

  • Finally we look at

    2 4 1 3 2 10 5 5 2 1 60 0 0 0 5 50 0 0 0 0 0

    In this example, the last line can be ignored, and the second last line gives x5 uniquely.Back-substituting into the second line gives an equation with three unknowns. Hence wewill need to introduce two parameters x4 = and x3 = and solve for x2. Then x1 canbe found in terms of these parameters. Observe in this case that there are two non-leadingcolumns in the row-reduced form of the matrix.

    Theorem:

    If the augmented matrix for a system of linear equations (A|b) is reduced to row-echelonform (U |y), then

    1. The system has no solution if the right-hand column y is a leading column.

    2. If the right-hand column y is not a leading column then the system has

    a unique solution if and only if every column of U is a leading column.

    infinitely many solutions if at least one column of U is non-leading column. Thenumber of parameters required to describe the solutions equals the number of non-leadingcolumns.

    Discuss the number of solutions of:

    2 4 1 3 2 10 5 5 2 1 60 0 0 0 5 50 0 0 0 0 6

    2 4 1 3 20 5 5 2 10 0 2 4 50 0 0 2 0

    13

  • 2 4 1 3 20 5 5 2 10 0 0 2 50 0 0 0 0

    The Homogeneous Equation.

    A system of equations which has each right-hand side equal to 0, i.e. Ax = 0, is calleda homogeneous system. Clearly,

    Theorem: A homogeneous system of equations always has at least one solution (viz x = 0),and has a unique solution if and only if every column in the row-echelon form is a leadingcolumn.

    Ex: The system 1 3 2 00 1 4 0

    0 0 0 0

    must have at least one solution and in fact has infinitely many since there is one non-leadingcolumn.

    Theorem: A homogenous system of linear equations with more unknowns than equationsalways has infinitely many solutions.

    Theorem: If x1 and x2 are solutions to Ax = b then x2 = x1 + v, where v is a solu-tion to the homogeneous equation Ax = 0.

    Corollary: Ax = b has unique solution iff Ax = 0 has unique solution.

    General conditions:

    Ex: Let

    A =

    1 3 23 1 4

    2 4 6

    14

  • Find conditions on the numbers b1, b2, b3 such that if b =

    b1b2

    b3

    then Ax = b has at least

    one solution.

    Ex: Find conditions on such that the system

    x1 + x2 + x3 = 1x1 + 2x2 + x3 = 02x1 + 4x2 + x3 = 1

    has a unique solution, no solution, infinitely many solutions.

    15

  • Some Applications of Linear Systems:

    Geometric Problems:

    We can use matrix methods to solve problems involving vector geometry using the ideasin the previous topic.

    Ex: Does

    3056

    belong to the span of

    1232

    ,

    0412

    ?

    Ex: Is v =

    17

    8

    parallel to the plane x =

    12

    3

    +

    13

    2

    +

    31

    4

    ?

    16

  • Ex: Find the intersection (if any) of the line x =

    12

    1

    +

    32

    1

    and the plane

    x =

    111

    7

    +

    35

    1

    +

    12

    5

    .

    17

  • Word Problems:

    The following diagram shows a one-way road system with three roundaboutsA,B andC.The numbers in the diagram indicate the numbers of vehicles entering or leaving the round-abouts in a certain hour, and there werex vehicles, y vehicles, and z vehicles passing throughAC,BC, andBA, respectively.

    A

    B

    C

    x

    y

    z

    100

    200

    150

    150

    200

    b

    b

    b

    a) By considering the number of vehicles entering and leaving roundaboutA, show thatxz = 50.

    b) By considering the number of vehicles entering and leaving the other roundabouts, writedown two further linear equations relatingx, y and z.

    c) Set up the augmented matrix for the three linear equations and solve to find the gen-eral solution.

    d) Find the maximum and the minimum of the possible values of z.

    18