First Exam Notes for ES 21

Embed Size (px)

Citation preview

  • 7/23/2019 First Exam Notes for ES 21

    1/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 1 of 12

    MATRICES

    Definition

    A matrix is a rectangular array of numbers or functionsarranged in rows and columns usually designated by acapital letter and enclosed by brackets, parentheses ordouble bars. A matrix may be denoted by:

    mnmm

    n

    n

    aaa

    aaa

    aaa

    A

    ...

    :::

    ...

    ...

    21

    22221

    11211

    Unless stated, we assume that all our matrices arecomposed of real numbers.

    The horizontal groups of elements are called the rowsof thematrix. The ith row of A is

    miaaa inii 1...21

    The vertical groups of elements are called the columns ofthe matrix. The jth column of A is

    nj

    a

    a

    a

    j

    j

    j

    1:

    3

    2

    1

    The size of a matrixis denoted by m x n (m by n) where mis the number of rows and n is the number of columns.

    We refer to aijas the entryor the elementin the ith row andjth column of the matrix.

    We may often write a given matrix as

    A = [aij].

    SOME SPECIAL TYPES OF MATRICES

    A. Row Matrix or Row Vector is a matrix consistsof only one row.

    Example: B = [b1 b2 . . . bj . . . bn]

    B. Column Matrix or Column Vector is a matrixconsists of only one column.

    Example:

    m

    i

    c

    c

    c

    c

    C

    .

    .

    .

    .

    ..

    2

    1

    C. Square Matrix is a matrix in which the no. ofrows equals the no. of columns.

    Order of a Square Matrix is the number of rowsor columns of the matrix. Thus, we can just referto a 3x3 matrix as a square matrix of order 3.

    Principal Diagonal or Main Diagonal of a SquareMatrixconsists of the elements a11, a22, a33,

    ann.

    The Trace of a Square Matrixis the sum of theelements on the main diagonal of the matrix.

    D. Upper Triangular Matrix a square matrix allelements of which below the principal diagonalare zero (aij= 0 for i>j).

    Example:

    33

    2322

    131211

    00

    0

    u

    uu

    uuu

    U

    E. Lower Triangular Matrix a square matrix allelements of which above the principal diagonalare zero (aij= 0 for i

  • 7/23/2019 First Exam Notes for ES 21

    2/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 2 of 12

    EQUALITY OF MATRICES

    Two matrices A = (aij) and B = (b ij) are equal if and only ifthe following conditions are satisfied:

    a) They have equal number of rows.b) They have equal number of columns.c) All elements in A agree with the elements in

    B. (aij=b

    ij, for all i and j.)

    Example: The matrices

    143

    221

    112

    3

    21

    21

    c

    bxBand

    zb

    ya

    cx

    A

    are equal if and only if x = 2, y = 1, z = 2, a = 3,b = 4 and c = 1.

    ELEMENTARY OPERATIONS ON MATRICES

    A. MATRIX ADDITION AND SUBTRACTION

    If A = (aij) and B = (bij) are matrices of the same size m x n,then the sum A + B is another m x n matrix C = [c ij] wherecij= aij+ bijfor i = 1 to m and j = 1 to n. Matrix addition isaccomplished by adding algebraically correspondingelements in A and B.

    Example:

    114

    223

    123

    421BA

    211

    204

    11)1(243

    )2(42231

    114

    223

    123

    421BA

    B. SCALAR MULTIPLICATION

    If A = (aij) is an m x n matrix and k is a real number (or ascalar), then the scalar multiple of A by k is the m x n matrixC = [cij] where cij= kaij for all i and j. In other words, thematrix C is obtained by multiplying each element of thematrix by the scalar k.Examples: We obtain

    156912

    9306

    5234

    31023

    28168

    4820

    1248

    742

    125

    312

    4

    C. MATRIX SUBTRACTION

    If A and B are m x n matrices, the difference between A andB denoted as AB is obtained from the addition of A and (-1)B.

    AB = A + (-1)BMatrix subtraction is accomplished by subtracting from theelements of the first matrix the elements of the secondmatrix correspondingly.

    Example:

    383

    412

    475

    243BA

    718

    651

    3487)3(5

    42)1(423

    383

    412

    475

    243BA

    Note: We can only add or subtract matrices with the same

    number of rows and columns.

    D. MATRIX MULTIPLICATION

    If A = (aij) is an m x n matrix and B = (bij) is an n xp matrix, then the product of A and B, AB = C =[cij] is an m x p matrix where

    n

    k

    kjikij bac1

    for i = 1 to m and j = 1 to p

    The formula tells us that in order to get theelement cijof the matrix C, get the elements of the

    ith row of A (the pre-multiplier) and the elementson the jth column of B (the post multiplier).Afterwards, obtain the sum of the products ofcorresponding elements on the two vectors.

    Note: The product is defined only if thenumber of columns of the first factorA (pre-multiplier) is equal to thenumber of rows of the second factorB (post-multiplier). If this issatisfied, we say that the matricesare comformable in the order AB.

    MATRIX EXPONENTIATION

    The formula Anwill be defined as AAAA

    Example:

    13

    42

    43

    21BA

    20

    1210

    )4)(1()2(3)3)(1()1(3

    )4)(4()2(2)3)(4()1(2

    1618

    68

    )1(4)4(3)3(4)2(3

    )1(2)4(1)3(2)2(1

    BA

    BA

    AB

    AB

    Note: Although AB and BA are defined it is not necessarythat AB = BA.

    Example:

    12

    31

    541

    326

    64

    35

    12

    CBA

    1. A x B is a 3 x 3 matrix while B x A isa 2 x 2 matrix.

    2. A x C is a 3 x 2 matrix but C x A is notdefined.

    3. B x C is not defined but C x B isdefined (2 x 3).

    E. MATRIX TRANSPOSITION

    If A = [aij] is an m x n matrix, then the transpose of A,denoted by A

    T=[aij] is an n x m matrix defined by a ij=aji.

  • 7/23/2019 First Exam Notes for ES 21

    3/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 3 of 12

    The transpose of A is obtained by interchanging the rowsand the columns of A.

    Example:

    2342

    3132

    5211

    235

    312

    431

    221

    TAthenAIf

    Note: The transpose of a symmetric matrix is equal to itself.PROPERTIES AND THEOREMS ON MATRIXOPERATIONS:

    MATRIX ADDITION

    A + O = A Existence of Additive IdentityA + (-A) = O Existence of Additive InverseA + B = B + A Commutative Property(A + B) + C = A + (B + C) Associative Property

    SCALAR MULTIPLICATION

    0 x A = O1 x A = Ok l (A) = k (l A) = l (k A)(k + l) A = k A + l Ak(A + B) = k A + k B

    MATRIX MULTIPLICATION

    A(BC) = (AB)C Associative PropertyA(B + C) = AB + AC Left Distributive Property(A + B)C = AC + BC Right Distributive PropertyAI = IA = A Existence of Multiplicative

    Identitykl (AB) = (k A)(l B) = (l A)(k B)

    Note: In general, Matrix Multiplication is not

    commutative. That is, AB BA.

    MATRIX TRANSPOSITION(A

    T)T= A

    (A + B)T= A

    T+ B

    T

    (k A)T= k A

    T

    (AB)T= B

    TA

    T

    In general (A1A2A3An-1An)T= An

    TAn-1

    TA3

    TA2

    TA1

    T

    DETERMINANTS

    Another very important number associated with a squarematrix A is the determinant of Awhich we will now define.This unique number associated to a matrix A is useful in thesolutions of linear equation.

    Permutation:

    Let S={1, 2, 3, , n} be the set of integers from 1 to n,arranged in increasing order. A rearrangement a1a2a3anofthe elements in S is called a permutation of S.

    By the Fundamental Principle of Counting we can put anyone of the n elements of S in the first position, any one ofthe remaining (n-1) elements in the second position, anyone of the remaining (n-2) elements in the third position,and so on until the nth position. Thus there are n(n-1)(n-2)3*2*1 = n! permutations of S. We refer to the set of allpermutations of S by Sn.

    Examples:

    If S = {1, 2, 3} then S3= {123, 132, 213, 231, 312, 321}

    If S = {1, 2, 3, 4} then there are 4! = 24 elements of S4.

    Odd and Even Permutations

    A permutation a1a2a3an is said to have an inversion if alarger number precedes a smaller one. If the total number ofinversion in the permutation is even, then we say that thepermutation is even, otherwise it is odd.Examples: ODD and EVEN Permutation

    S1has only one permutation; that is 1, which is even sincethere are no inversions.

    In the permutation 35241, 3 precedes 2 and 1, 5 precedes2, 4 and 1, 2 precedes 1 and 4 precedes 1. There is a totalof 7 inversions, thus the permutation is odd.

    S3has 3! = 6 permutations: 123, 231and 312 are even while132, 213, and 321 are odd.

    S4has 4! = 24 permutations: 1234, 1243, 1324, 1342, 1423,1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142,3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312,4321.

    For any Sn, where n>1 it contains n!/2 even permutationsand n!/2 odd permutations.

    DEFINITION: DETERMINANT

    Let A = [aij] be a square matrix of order n. The determinant

    of A denoted by det(A) or Ais defined by

    nnjjj

    aaaAA ...det21 21

    where the summation is over all permutations j1j2jnof theset S = {1,2,,n}. The sign is taken as (+) if the permutationis even and () if the permutation is odd.

    Examples:

    If A = [a11] is a 1 x 1 matrix then det(A) or A= a11.

    If A =

    2221

    1211

    aa

    aa , then to get Awe write down the terms a1-

    a2-b and replace the dashes with the all-possiblepermutations of S = {1, 2}, namely 12 (even) and 21 (odd).

    Thus A= a11a22 - a12a21.

    If A =

    333231

    232221

    131211

    aaa

    aaa

    aaa , then to compute the A we write

    down the six terms a1-a2-a3-, a1-a2-a3-, a1-a2-a3-, a1-a2-a3-, a1-a2-a3-, a1-a2-a3-. Replace the dashes with all the elements of S3,affix a (+) or (-) sign and get the sum of the six terms.

    If A is a square matrix of order n, there will be n! terms inthe determinant of A with n!/2 positive terms and n!/2negative terms.

    9

    620098

    )2)(1)(3()1)(1)(2()3)(2)(0()1)(1)(0()3)(1)(3()2)(2)(2(

    210

    123

    312

    METHODS IN GETTING THE DETERMINANT

    A. DIAGONAL METHOD

    This method is applicable to matrices with sizeless than or equal to 3.

    1. 2 x 2 Matrices

  • 7/23/2019 First Exam Notes for ES 21

    4/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 4 of 12

    12212211

    2221

    1211aaaa

    aa

    aa s

    2. 3 x 3 Matrices

    B. METHOD OF COFACTORS

    Complementary Minor, det(Mij) or MijThe complementary minor or simply minor of an element a ijof the matrix A is that determinant of the sub-matrix Mijobtained after eliminating the ith row and jth column of A.

    Algebraic Complement or Cofactor, Aij

    The algebraic complement or cofactor of an element a ij ofthe matrix A is that signed minor obtained from the formula

    (-1)i+j

    Mij

    DETERMINANT USING THE COFACTOR METHOD

    The determinant of a square matrix maybe obtained usingexpansion about a row or expansion about a column. Thefollowing formulas maybe used in getting the determinant:

    n

    k

    ikikininiiii AaAaAaAaA1

    2211 ...)det(

    (expansion about the ith row)

    and

    n

    k

    kjkjnjnjjjjj AaAaAaAaA1

    2211 ...)det(

    (expansion about the ith row)

    Note: We may choose any row or any column in getting thedeterminant of a given matrix.

    Example: To evaluate

    0130

    0423

    1412

    0301

    It is best to expand about the fourth row because it has themost numbers of zeros. The optimal course of action is toexpand about the row or column that has the largestnumber of zeros, because in that case the cofactors Aijof

    those aijwhich are zero need not be evaluated since theproduct of aijAij= (0)Aij= 0.

    THEOREMS ON DETERMINANTS

    1. If a square matrix A = [aij] contains a row (or a column)

    that has elements all equal to zero, then A= 0.

    Example:

    0

    042

    032

    021

    2. The determinant of a square matrix A = [aij] is equal to

    the determinant of its transpose AT = [aij].(i.e.A=AT)

    Example:

    233

    422

    141

    241

    324

    321

    3. If a row (or column) of a square matrix A = [aij] ismultiplied by a constant k, then the determinant of theresulting matrix B = [bij] is equal to k times the

    determinant of A (i.e. B= kA).

    Example:

    10)5(2

    224

    224

    1

    5

    224

    2

    1

    ba

    yx

    ba

    then

    ba

    yx

    ba

    If

    4. As a corollary to the third theorem, if A has a row (orcolumn) that has a common factor l, then this k may befactored out of the determinant of A, where a simplified

    matrix B is formed. (i.e. .A= kB.

    Example:

    xy

    yyx

    xxy

    xy

    xy

    yyx

    xxy

    xy

    xyxy

    yyyx

    xxxy

    218343

    23

    )2(22183862

    23

    22186864

    232

    2

    2

    5. If two row (or columns) of a square matrix A = [aij] were

    interchanged to form a new matrix B = [b ij], then B=-A.

    Example:

    1

    02

    002

    1

    002

    02

    yzyx

    xxy

    x

    yzyx

    x

    xxy

    6. If two rows (or columns) of a matrix A = [aij] are

    identical then A= 0.Example:

    0

    xyzxy3z4

    xyzz5yx3x2

    xz2x3yx2

    xzyz5yx3x2

    x3

    xyzxy3z4

    yzx3xz15xy3x9x6

    xz2x3yx2

    xyzz5yx3x2

    22

    222

    7. As a corollary to the sixth theorem, if the elements in a

    row (or column) of a square matrix A = [a ij] aremultiples of the corresponding elements of another row

    or column of the matrix A, then A= 0.Example:

    0

    216

    464

    232

    xyy

    8. If B = [bij] is a square matrix of order n that is derivedfrom another square matrix A = [a ij] of order n, byadding correspondingly the elements of a row (orcolumn) to a multiple of the elements of another row

    (or column), then B=A.Example:

    333231

    232221

    331332123111

    333231

    232221

    131211

    aaa

    aaa

    kaakaakaa

    aaa

    aaa

    aaa

    9. If the elements of one row (or column) of a squarematrix A = [aij] of order n may be expressed as

    binomials such that two square matrices B = [bij] and C= [cij] both of order n, are formed after splitting the

    binomial elements, then A=B+C.Example:

    3231

    2221

    1211

    333231

    232221

    131211

    aa

    aa

    aa

    aaa

    aaa

    aaa

  • 7/23/2019 First Exam Notes for ES 21

    5/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 5 of 12

    333231

    232221

    131211

    333231

    232221

    131211

    333231

    232322222121

    131211

    aaa

    ccc

    aaa

    aaa

    bbb

    aaa

    aaa

    cbcbcb

    aaa

    10. The determinant of the product of two square matrices A= [aij] and B = [bij] of the same order n is equal to the

    product of the determinant of A and the determinant of B.Example:

    If 2

    216

    464

    232

    xyy

    z

    x

    and

    222

    56

    543

    bbaa

    ba

    a

    = 3

    then

    xyy

    z

    x

    216

    464

    232

    222

    56

    543

    bbaa

    ba

    a

    = 32 = 6 .

    11. The determinant of a triangular matrix is equal to theproduct of the elements in its principal diagonal.

    Example:

    4

    1

    02

    0022

    x

    yzyx

    xxy

    x

    12. The determinant of an Identity Matrix is equal to 1.

    ADJOINT OF A MATRIX

    The Adjoint of a square matrix A=[aij] of order n is thatsquare matrix with the same order n denoted by adj(A)=[Aji]where Aijis the cofactor of the element aijof matrix A. Theadjoint of a matrix is the transpose of the matrix of cofactors

    of the elements of A.

    Input: Square MatrixOutput: Square Matrix (with the same size as the originalmatrix)

    Notation: adj A, adj B

    Step 1: Get the cofactors of all the elements in theoriginal matrix.

    Recall: the cofactor of an element aij can be denoted as Aijand is defined by:

    ijji

    ij MA )1(

    Step 2: Set up the adjoint matrix by taking the transposeof the matrix of cofactors.

    TijAAadj

    Example:

    If A =

    dc

    bathen adj(A) =

    ac

    bd.

    Inverse of a Matrix

    The inverse of a square matrix A = [aij] of order n is that

    matrix B = [bij] of the same order n such that AB = BA = In.We denote the inverse matrix of A by A-1. Thus, we define

    the inverse of A as that matrix A-1

    such that

    A(A-1) = (A

    -1)A = In.

    Not all matrices has its inverse. However, if the inverse of amatrix exists, it is unique.

    If the inverse of a matrix exists, we say that the matrix isinvertible or non-singular. Otherwise, we say that the matrixis non-invertible or singular.

    Matrix Inversion Using the Adjoint

    and the Inverse

    Matrix Inversion applies only to square matrices and can beproduced using the adjoint matrix and thedeterminant.

    Notation: A-1, B

    -1

    The proof of this needs the knowledge of the followingtheorem:

    The sum of the products of the elements in one row (or

    column) and the cofactors of the elements of another row(or column) of a given square matrix is zero.

    From the above formula for inverse, it is highly suggestedthat the determinant be computed first. If it sohappened that the matrix is singular (i.e., thedeterminant is zero), then the inverse of thematrix is said to be non-existent.

    Note that it is a waste of effort to still produce the adjoint if

    the matrix is singular. Therefore, it is advised

    that you first check for singularity.Example: Set up the Inverse of the given matrix.

    Using the diagonal method to compute for the determinantof the given matrix:

    Since matrix A is singular, as evidenced by its zerodeterminant, it can thus be concluded that theInverse of A (or A-1) does not exist.

    Example 2: Set up the Inverse of the given matrix

    324

    321

    111

    A 73682126 A

    Since the determinant is not zero, then matrix A is said to be non-singular. In this case, the inverse exists and there is a need to set upthe adjoint.

    Getting the cofactors of all the elements in the original matrix.

    ijji

    ij MA )1(

    1232

    32)1( 211

    A 934

    31)1( 312 A

    10

    24

    21)1( 413

    A 1

    32

    11)1( 321

    A

    134

    11)1( 422 A

    224

    11)1( 523

    A

    771

    252

    111

    A

    A

    adjAA 1

    01414514235 A

  • 7/23/2019 First Exam Notes for ES 21

    6/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 6 of 12

    532

    11)1( 431

    A 2

    31

    11)1( 532 A

    321

    11)1( 633

    A

    325

    211

    10912

    ijA ,thus

    Consequently,A

    AadjA 1

    3210

    219

    5112

    7

    11A

    SOLUTION TO SYSTEM OF LINEAR EQUATIONS

    In general, we can think of a system of linearequations as a set of m equations that contains nunknowns. There are several forms by which a system ofequations can be written.

    We can have the equation form:

    mnmnmmm

    nn

    nn

    nn

    bxaxaxaxa

    bxaxaxaxa

    bxaxaxaxa

    bxaxaxaxa

    332211

    33333232131

    22323222121

    11313212111

    Or we can transform that to the matrix form:

    mnmnmmm

    n

    n

    n

    b

    b

    b

    b

    x

    x

    x

    x

    aaaa

    aaaa

    aaaa

    aaaa

    3

    2

    1

    3

    2

    1

    321

    3333231

    2232221

    1131211

    Referring to the matrix form, we can actually rewrite thesystem of equations as a compact matrix operation:

    AX = B.

    Where:

    A Coefficient Matrix

    X

    Column Matrix of Unknowns/VariablesB Column Matrix of Constants

    SOLUTION TO SYSTEM OF n-LINEAR EQUATIONSWITH n UNKNOWNS

    A. USING THE INVERSE METHOD

    The Inverse Method maybe applied only to asystem of linear equations in which the number ofindependent equations is equal to the number of unknowns.If the number of equations is equal to the number ofunknowns, the equation AX = B will have a matrix ofcoefficients that is square.

    If the matrix of coefficients A is non-singular, thesolution to the system is unique. On the other hand, if A issingular, either the system has a unique solution or nosolution at all.

    Derivation of the Solution forxis:

    BAX

    BAXI

    BAXAA

    BAAXA

    BAX

    1

    1

    11

    11

    *

    **)(

    *

    Example: Determine the values of x1, x2 and x3 in thefollowing system of equations.

    5324

    632

    1

    321

    321

    321

    xxx

    xxx

    xxx

    Solution:

    The above system of equations can be written in matrixform:

    56

    1

    324321

    111

    3

    2

    1

    xx

    x

    We can write this in matrix form AX = B and let X = A-1B,

    where:

    324

    321

    111

    A

    Getting A-1

    3210

    219

    5112

    7

    11A

    To getx1,x2andx3, multiplyA-1to B:

    5

    6

    1

    *

    3210

    219

    5112

    7

    1

    3

    2

    1

    x

    x

    x

    X

    Performing the operationA-1B will yield the solution

    matrix:

    1

    1

    1

    3

    2

    1

    x

    x

    x

    X

    Make it a habit to check if all the computed values of the

    unknowns satisfy all the given equations. Checking is doneby substituting the valuesx1 = 1,x2= 1 andx3= 1 to theoriginal equations.

    Equation11(1)1(1) + 1(1) =? 1Satisfied

    Equation 21(1) + 2(1) + 3(1) =? 6Satisfied

    Equation 34(1)2(1) + 3(1)=? 5Satisfied

    Since all the equations were satisfied, then (x1,x2,x3) = (1,1, 1) is indeed the solution to the system.

    SOLUTION TO SYSTEM OF EQUATIONS USINGCRAMER'S RULE

    Recall that A system of equation n equations in nunknowns can be modeled as a matrix operation AX = B.

    3210

    219

    5112

    Aadj

    where aijareconstantcoefficients of theunknowns xjand bI

    Take note that thederivation assumesthat A

    -1exists. If A

    -1

    does not exist, wecan not find thesolution to the

    system AX = B.

  • 7/23/2019 First Exam Notes for ES 21

    7/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 7 of 12

    nnnnnnn

    n

    n

    n

    b

    b

    b

    b

    x

    x

    x

    x

    aaaa

    aaaa

    aaaa

    aaaa

    3

    2

    1

    3

    2

    1

    321

    3333231

    2232221

    1131211

    Let:A

    coefficient matrixxi ithvariable

    B right hand side constantsA I matrix resultingfrom replacing the

    ithcolumn ofAby the column

    vector of constants B

    The solution of the system of equations can be determinedby using the formula:

    A

    Ax

    i

    i

    Notice that regardless of the variable ithat is computed, thedenominator of the above formula is fixed at |A|. Therefore,it is suggested that the determinant of the coefficient matrixbe the first to be computed.

    Example:Using Cramer's Rule, determine the values ofx1,x2andx3that simultaneously satisfy the following system ofequations.

    3

    2

    1

    121

    133

    121

    3

    2

    1

    x

    x

    x

    Solution:

    Compute for the determinant ofA first:

    6623623

    121

    133

    121

    A

    A

    Now, let us compute for the value ofx1by using the formula

    A

    Ax

    11

    The right hand side matrix B is

    3

    2

    1

    To set up the matrix A1, all you just have to do is to replacethe first column ofAby b. Doing what has just beendescribed will result in:

    0429463

    123132

    121

    1

    1

    A

    A 06

    011

    A

    A

    x

    Applying the same process to solvex2 and x3:

    1

    321

    233

    121

    *6

    11

    131

    123

    111

    *6

    1 33

    22

    A

    Ax

    A

    Ax

    SOLUTION TO SYSTEM OF LINEAR EQUATIONS USINGL-U FACTORIZATION

    Direct L-U Factorization:

    In theory any square matrix A may be factored into aproduct of lower and upper triangular matrices.

    Let us take the case of a 4thorder matrix:

    1000

    100

    10

    1

    *0

    00

    000

    34

    2423

    141312

    44434241

    333231

    2221

    11

    44434241

    34333231

    24232221

    14131211

    u

    uu

    uuu

    llll

    lll

    ll

    l

    aaaa

    aaaa

    aaaa

    aaaa

    Notice that the diagonal elements of the upper triangularmatrix have been set to values of 1 for reason of simplicity.(L-U Factorization is not unique.)

    From matrix multiplication, we know that:

    )0(0)0(0)0(0)1(1111 la or 1111 al

    )0(0)0(0)0()1( 222121 lla or 2121 al

    )0(0)0()0()1( 33323131 llla or 3131 al

    )0()0()0()1( 4443424141 lllla or

    4141 al

    )0(0)0(0)1(0)( 121112 ula or 111212 / lau

    )0(0)1(0)(0)( 23131113 uula or 111313 / lau

    )1(0)(0)(0)( 3424141114 uuula or

    111414 / lau

    )0(0)0(0)1()( 22122122 lula or

    )( 12212222 ulal

    )0(0)0()1()( 3332123132 llula or

    )( 12313232 ulal

    )0()0()1()( 444342124142 lllula or

    )( 12414242 ulal

    )0(0)1(0)()( 2322132123 ulula or

    2213212323 /)]([ lulau

    )1(0)(0)()( 232422142124 uulula or

    2214212424 /)]([ lulau

    )0(0)1()()( 332332133133 lulula or

    )()( 233213313333 ululal

    )0()1()()( 44432342134143 llulula or

    )()( 234213414343 ululal

    )1(0)()()( 34332432143134 ululula or

    33243214313434 /)]()([ lululau

    )1()()()( 4434432442144144 lululula or

    )()()( 3443244214414444 ulululal

    How to get the solution to a system of equations usingL-U Decomposition Method?

    Recall:A system of equations can be written as a compactmatrix operationAX = B

    If we factor out the coefficient matrix A as L*U andsubstitute to AX = B, we can generate the equationL(UX)=B.

    Momentarily define UX = Y which suggests LY = B. Fromthis transformation, we have actually decomposedAX = b totwo systems of equations.

    Two-stage solution:

  • 7/23/2019 First Exam Notes for ES 21

    8/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 8 of 12

    I. Solve for Y in the equation LY = B using forwardsubstitution.

    II. Solve for X in the equation UX = Y using backsubstitution.

    Example: Determine the values ofxi'sin :

    8

    4

    3

    121

    153

    124

    3

    2

    1

    x

    x

    x

    Knowing that

    121

    153

    124

    A

    , therefore

    25251

    0273

    004

    L

    and

    100211041

    211

    U

    Stage 1: Forward substitution using LY = B

    8

    43

    25

    251

    02

    73004

    3

    2

    1

    y

    yy

    Note that the computed values of yi'shere are not yet thesolution since the original system of equations is in terms ofxi's.

    Stage 2: Back substitution using UX = Y

    32

    14

    3

    1002

    110

    41

    211

    3

    2

    1

    x

    x

    x

    This time (x1,x2,x3) = (1, 2, 3) is the solution to the originalsystem of equations.

    AUGMENTED MATRIX OF A AND B

    If A is an m x n matrix and B is a p x n matrix, then theaugmented matrix of A and B denoted by [A : B] is thematrix formed by the elements of A and B separated bypipes.

    Example:

    If

    833

    617

    521

    A

    and

    47

    20

    12

    Bthen A : B is

    47

    20

    12

    |

    |

    |

    833

    617

    521

    The augmented matrix associated to a system of linearequation AX=B is the matrix [A : B]. For example, we cannow rewrite the system of equation:

    1

    1

    1

    142

    621

    312

    z

    y

    xas simply

    1

    1

    1

    |

    |

    |

    142

    621

    312.

    ECHELON FORM OF A MATRIX

    An m x n matrix A is said to be in row echelon form if itsatisfies the following properties:

    1. All rows whose elements are all zeros, ifexist, are at the bottom of the matrix.

    2. If at least one element on a row is not equalto zero, the first non-zero element is 1, andthis is called the leading entry of the row.

    3. If two successive rows of the matrix haveleading entries, the leading entry of the rowbelow the other row must appear to theright of the leading entry of the other row.

    An m x n matrix A is said to be in reduced row echelon formif added to the first three properties it satisfies a fourthproperty:

    4. If a column contains a leading entry ofsome row, then all the other entries mustbe zero.

    Example:

    The following matrices are not in row echelon form. (Whynot?)

    0010

    8100

    7610

    4221

    0000

    1000

    0100

    0210

    0001

    100000

    000000

    291000

    531010

    231021

    CBA

    The following matrices are in row echelon form but not inreduce row echelon form.

    0000

    0000

    0100

    3010

    0801

    00100

    80010

    26501

    1000

    2100

    3210

    4321

    FED

    The following matrices are in reduced row echelon form.(Hence, in row echelon form.)

    000

    000

    000

    010

    301

    01000

    30100

    20010

    1000

    0100

    0010

    0001

    JHG

    ELEMENTARY ROW (COLUMN) OPERATIONS ONMATRICES

    An elementary row (column) operation on a matrix A is anyone of the following operations:

    Type I. Interchange any two rows (columns).Type II. Multiply a row (column) by a non-zero

    constant k.Type III. Add to elements of a row k times of the elementsof another row the correspondingly.

    Example: Let

    2282

    4613

    0201

    A

    Interchanging rows 1 and 3 of A (R1R3) obtain

    0201

    4613

    2282

    B

    Multiplying row 3 by (R3R3), we obtain

    34 1 y 43

    1 y

    42

    7321

    yy2

    12y

    82

    52

    5321

    yyy 33y

    33 x

    21

    21

    32 xx 22 x

    43

    41

    21

    321 xxx 11x

    33 x

  • 7/23/2019 First Exam Notes for ES 21

    9/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 9 of 12

    1141

    4613

    0201

    C

    Adding 3 times the elements in row 1 to the elements in row

    2 (R2R2 + 3R1), we obtain

    22824010

    0201

    A

    ELEMENTARY ROW OPERATIONS AS APPLIED TOTHE A SYSTEM OF EQUATION A:B

    As a applied to the augmented matrix [A : B] as a system ofequation, the three elementary row operation willcorrespond to the following:

    TYPE I rearranging the order of the equationsTYPE II multiplying both side of the equation by

    a constant

    TYPE III working with two equations

    From this observation, we could see that as applied to aoperations does not alter the solution of the system.

    ROW (COLUMN) EQUIVALENT MATRICES

    An m x n matrix A is row (column) equivalent to an m x nmatrix B if B can be obtained from A by applying a finitesequence of elementary row operations.

    THEOREMS ON MATRIX EQUIVALENCE

    1. Every nonzero m x n matrix A = [aij] is row (column)equivalent to a matrix in row (column) echelon form.

    2. Every nonzero m x n matrix A = [aij] is row (column)equivalent to a matrix in reduced row (column) echelonform.

    3. Let AX = B and CX = D be two systems of m linearequations in n unknowns. If the augmented matrices[A : B] and [C : D] are row equivalent, then the linearsystems are equivalent (i.e. they have exactly thesame solutions).

    4. As a corollary to the third theorem, if A and B are rowequivalent matrices, then the homogeneous systemsAX = 0 and BX = 0 are equivalent.

    SOLUTIONS TO A SYSTEM OF m EQUATIONS in nUNKNOWNS

    In general a system of m equations inn unknowns maybe written in matrix form:

    mnmnmmm

    n

    n

    n

    b

    b

    b

    b

    x

    x

    x

    x

    aaaa

    aaaa

    aaaa

    aaaa

    3

    2

    1

    3

    2

    1

    321

    3333231

    2232221

    1131211

    .

    This system may now be represented by the augmentednotation:

    mmnmmm

    n

    n

    n

    b

    b

    b

    b

    aaaa

    aaaa

    aaaa

    aaaa

    3

    2

    1

    321

    3333231

    2232221

    1131211

    |

    |

    |

    |

    Applying the theorems on equivalent matrices we now havethe following methods of solution:

    GAUSSIAN ELIMINATION METHOD

    The objective of the Gaussian Elimination Method is totransform the augmented matrix [A : B] to the matrix [A* :B*] in row echelon form by applying a series of elementaryrow transformations. Getting the solution of the system [A* :B*] using back substitution will also give the solution to theoriginal system [A : B].

    To reduce any matrix to row echelon form, apply thefollowing steps:

    1. Find the leftmost non-zero column.2. If the 1

    st row has a zero in the column of step 1,

    interchange it with one that has a non-zero entry in

    the same column.3. Obtain zeros below the leading entry by adding

    suitable multiples of the top row and to the rowsbelow that.

    4. Cover the top row and repeat the same processstarting with step 1 applied to the leftover submatrix.Repeat this process with the rest of the rows.

    5. For each row obtain leading entry 1 by dividing eachrow by their corresponding leading entry.

    Example: The linear system

    33

    82

    932

    zx

    zyx

    zyx

    has the augmented matrix associated to the system

    3|103

    8|112

    9|321

    :BA

    which can be transformed as a matrix in row echelon form

    3|100

    2|110

    9|321

    : ** BA

    using back substitution we have

    2)3(3)1(29932

    1322

    3

    xzyx

    yzy

    z

    thus we have the solution (x, y, z) = (2, -1, 3).

    GAUSS-JORDAN REDUCTION METHOD

    On the other hand a second method called the Gauss-Jordan Reduction Method gets rid of the back substitutionphase. The objective of the Gauss-Jordan ReductionMethod is to transform the augmented matrix [A : B] to thematrix [A* : B*] in reduced row echelon form by applying aseries of elementary row transformations. Doing this willautomatically give the solution of the system [A* : B*] whichalso provides the solution to the original system [A : B].

    To reduce any matrix to reduced row echelon form, apply

    the following steps (SINE):

    1. Search search the ith column of the augmentedmatrix from the ith row to the nth row for the

  • 7/23/2019 First Exam Notes for ES 21

    10/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 10 of 12

    maximum pivot, i.e. element with the largest absolutevalue.

    2. Interchange assuming the maximum pivot occursin thejthrow, interchange the ithrow and thejthrowso that the maximum pivot will now occur in thediagonal position.

    3. Normalizenormalize the new ithrow by dividing itby the maximum pivot on the diagonal position.

    4. Eliminateeliminate the ithcolumn from the first upto the nthequation, except in the ithequation itselfusing the transformations.

    Example: The linear system

    33

    82

    932

    zx

    zyx

    zyx

    has the augmented matrix associated to the system

    3|103

    8|112

    9|321

    : BA

    which can be transformed as a matrix in row echelon form

    3|100

    1|010

    2|001

    : ** BA

    thus we have the solution (x, y, z) = (2, -1, 3).

    SUBMATRIX AND RANK

    SUBMATRIXA submatrix of A=[aij] is any matrix obtained by eliminatingsome rows and/or columns of the matrix A.

    Example: Let

    275114

    25961

    28303

    81032

    A

    The following are some submatrices of A:

    )remaining

    columnond(sec28303

    )remaining

    columnfourth(

    7

    5

    8

    1

    )columnfifthand

    third,firstremove(

    2511

    296

    230

    803

    )columnfifthandthird

    androwondsecremove(

    7114

    561

    132

    )rowthirdremove(

    275114

    28303

    81032

    RANK OF A MATRIX

    The rank of a matrix A = [a ij] is the order of the largestsquare submatrix of A with a non-zero determinant. Wedenote the rank of A by rank(A) or simply r(A).

    Example: What is the rank of A?

    10503

    3412

    4321

    A

    Solution:

    Checking out first the determinants of 3x3 submatrices:

    060

    1050

    341

    432

    014

    1053

    342

    431

    0

    1003

    312

    421

    0

    503

    412

    321

    Since at least one 3x3 submatrix of A has a non-zerodeterminant, then r(A) = 3.

    Example: What is the rank of B?

    161284

    12963

    8642

    4321

    B

    Solution:

    The determinant of B is equal to zero (THEOREM:Proportional rows). And it can also be shown that 3x3submatrices of B will have determinants equal to zero.

    0

    1684

    1263

    842

    .g.e

    (Rows are proportional)

    But at least one 2x2 submatrix has non-zero determinant.

    02463

    42.g.e

    Therefore r(B) = 2.

    THEOREMS ON RANKS

    1. The rank of a matrix is not altered by anysequence of elementary row (column)transformations.

    2. Let A = [aij] and B = [bij] be two mxn matrices, ifrank(A) = rank(B) then A and B are equivalent.

    3. If A = [aij] and B = [bij] are mxn matrices, andrank(A) = rank(B) = n, then rank(AB) = rank(BA) =n.

    Example: What is the rank of C?

    98765

    87654

    76543

    65432

    54321

    C

    Solution:Operating on rows of matrix C, we obtain the equivalentmatrix C

    455

    344

    233

    122

    RR'R

    RR'R

    RR'R

    RR'R

    11111

    11111

    11111

    11111

    54321

    'C

    We could easily see that all 5x5, 4x4 and 3x3 submatricesof C have determinants equal to zero (THEOREM: Identicalrows). But for at least one 2x2 submatrix of C has a non-zero determinant.

    (e.g. 0111

    21 )

  • 7/23/2019 First Exam Notes for ES 21

    11/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 11 of 12

    Consequently r(C) = 2. But C and C are equivalentmatrices and hence they have equal ranks. Therefore r(C) isalso equal to 2.

    RANKS AND THE TYPES OF SOLUTION TO A SYSTEMOF EQUATION

    Recall that for the system of m linear equations in nunknowns AX = B. We can associate the system ofequation to the augmented matrix of the system [A:B].

    The type of solution may be classified as unique, non-unique or inconsistent. Applying the concept of rank to theaugmented matrix [A:B], we have the following propositions:

    1. If r(A) = r([A:B]) = n then the solution to thesystem is unique.

    Example:

    3:100

    1:010

    3:001

    1:111

    27:139

    1:111

    2. If r(A) = r([A:B]) < n, then the solution to the

    system is non-unique.

    Example:

    0:000

    1:010

    1:001

    6:224

    3:112

    0:111

    3. If r(A) < r([A:B]), then the system has no solutionor inconsistent.

    Example:

    3:000

    23:01045:001

    6:116

    2:224

    3:112

    Example 1: Rank and the Type of Solution to a System

    For what values of k will the system of equations havea) a unique solutionb) a non-unique solutionc) no solution

    2

    k8z5y

    k5z4y2x

    k2z3y3x2

    Solution: In augmented matrix form, we have:

    28|510

    5|421

    2|332

    k

    k

    k

    Performing Gaussian Elimination Method:

    kk

    k

    kRRR

    k

    k

    kRRR

    k

    k

    kRR

    k

    k

    k

    88|000

    8|510

    5|421

    8|510

    8|510

    5|4212

    8|510

    2|332

    5|421

    8|510

    5|421

    2|332

    2

    23

    '

    3

    2

    12

    '

    2

    2

    21

    2

    Therefore we have the following conclusions:

    a) For a unique solution, r(A) = r[A:B] = n

    There will be no value of k that will satisfy thissince r(A) = 2 < n =3.

    b) For non-unique solutions, r(A) = r[A:B] < n.

    This will be satisfied if r[A:B] is also equal to 2.This will happen when the last element in the third row ofthe augmented matrix is also equal to zero.

    8k2

    - 8k = 0 k = 0, 1.

    c) For the system to be inconsistent, r(A) < r[A:B]. This willbe satisfied if r[A:B] = 3 > 2. This will happen when the lastelement in the third row of the augmented matrix is notequal to zero.

    8k2- 8k 0 k 0, 1.

    Example 2:

    For what values of m will the system of equations haved) a unique solutione) a non-unique solutionf) no solution

    4mc2mba

    0ca)2m(2cba

    Solution: In augmented matrix form, we have:

    4|11

    0|102

    2|111

    2mm

    m

    Performing Gaussian Elimination Method:

    2|100

    42|120

    2|111)2(

    4|11

    0|102

    2|111

    213

    '

    3

    12

    '

    2

    2

    mm

    mmm

    RRR

    RmRR

    mm

    m

    Therefore we have the following conclusions:

    Therefore we have the following conclusions:

    a) For a unique solution, r(A) = r[A:B] = n

    This will be satisfied if m2-10 andm-20. Thuswe have a unique solution if m 1,2.

    b) For non-unique solutions, r(A) = r[A:B] < n.

  • 7/23/2019 First Exam Notes for ES 21

    12/12

    First Exam CoverageES 21 Notes

    ES 21 NotesPage 12 of 12

    This will happen when the last element in the thirdrow of matrix A and the augmented matrix are both equal tozero.

    m2- 1 = 0 and m+2 = 0.

    There is no value of m that will satisfy bothequation.

    The other value of m to be checked is when m = -2.Substituting this to the system gives the system:

    0|300

    0|100

    2|111

    Clearly, we could see that the resulting systemgives a non-unique solution because, r(A) = r[A:B]=2 2. This willhappen when the last element in the third row of theaugmented matrix is not equal to zero but the last elementof the third row of A is equal to zero.

    m21 = 0 and m+2 0.

    Thus, the system is inconsistent when m = 1 .