7.1 introduction to matrices

Upload: romar-angelo-avila

Post on 03-Jun-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 7.1 Introduction to Matrices

    1/18

    Introduction toMatrices

    7.1IntroductionWhen we wish to solve large systems of simultaneous linear equations, which arise for examplein the problem of nding the forces on members of a large framed structure, we can isolatethe coefficients of the variables as a block of numbers called a matrix. There are many otherapplications of a matrix. In this Block we develop the terminology and basic properties of amatrix.

    Prerequisites

    Before starting this Block you should . . .

    be familiar with the rules of numberalgebra

    Learning OutcomesAfter completing this Block you should be ableto . . .

    express a system of linear equations inmatrix form

    recognise and use the basic terminologyassociated with matrices

    carry out addition and subtraction withtwo given matrices or state that theoperation is not possible

    Learning StyleTo achieve what is expected of you . . .

    allocate sufficient study time

    briey revise the prerequisite material

    attempt every guided exercise and mostof the other exercises

  • 8/12/2019 7.1 Introduction to Matrices

    2/18

    1. Two Applications of MatricesThe solution of simultaneous linear equations is a task frequently occurring in engineering. Inelectrical engineering the analysis of circuits provides a ready example.However the simultaneous equations arise we now want to begin to study two things:

    (a) how we can conveniently represent large systems of linear equations

    (b) how we might nd the solution of such equations.

    We shall discover that knowledge of the theory of matrices is an essential mathematical tool inthis area.Suppose that we wish to solve the following three equations in three unknowns x1 , x 2 and x3 :

    3x 1 + 2 x 2 x 3 = 3x 1 x 2 + x 3 = 4

    2x 1 + 3 x 2 + 4 x 3 = 5

    We can isolate three facets of this system: the coefficients of x1 , x 2 , x 3 ; the unknownsx 1 , x 2 , x 3 ; and the numbers on the right-hand sides.Notice that in the system

    3x + 2y z = 3x y + z = 4

    2x + 3y + 4 z = 5

    the only difference from the rst system is the names given to the unknowns. It can be checkedthat the rst system has the solution x1 = 2 , x 2 = 1, x 3 = 1 . The second system thereforehas the solution x = 2 , y = 1, z = 1 .We can isolate the three facets of the rst system by using arrays of numbers and of unknowns:

    3 2 11 1 12 3 4

    x 1x 2x 3

    =345

    Even more conveniently we represent the arrays with letters (usually capital letters)

    AX = B

    Here, to be explicit, we write

    A =3 2 11 1 12 3 4

    X =x 1x 2x 3

    B =345

    Here A is called the matrix of coefficients, X is called the matrix of unknowns and B is calledthe matrix of constants , (the plural of matrix is matrices .)If we now append to A the column of right-hand sides we obtain the augmented matrix forthe system:

    3 2 11 1 12 3 4

    345

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    2

  • 8/12/2019 7.1 Introduction to Matrices

    3/18

    The order of the entries, or elements, is crucial. For example, all the entries in the second rowrelate to the second equation, the entries in column 1 are the coefficients of the unknown x1 ,and those in the last column are the constants on the right-hand sides of the equations.In particular, the entry in row 2 column 3 is the coefficient of x3 in equation 2.Shortest-distance problems are important in communications study. Figure 1 illustrates schemat-ically a system of four towns connected by a set of roads.

    a b

    c d

    Figure 1

    The system can be represented by the matrix

    a b c dabcd

    0 1 0 01 0 1 10 1 0 10 1 1 0

    The row refers to the town from which the road starts and the column refers to the town whereit ends. An entry of 1 indicates that two towns are directly connected by a road (for exampleb and d) and an entry of zero indicates that there is no direct road (for example a and c). Of course if there is a road from b to d (say) it is also a road from d to b.

    In this block we shall develop some basic ideas about matrices.

    2. DenitionsAn array of numbers rectangular in shape, is called a matrix . The rst matrix below has 3rows and 2 columns and is said to be a 3 by 2 matrix (written 3 2)

    1 4 2 3

    2 1

    1 2 3 45 6 7 9

    The second matrix is a 2 by 4 (written 2 4).The general 3 3 matrix can be written

    A =a 11 a12 a13a 21 a22 a23a 31 a32 a33

    where a ij denotes the element in row i, column j .For example in the matrix:

    A =0 1 30 6 125 7 123

    3 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    4/18

    thena 11 = 0 , a 12 = 1, . . . a 22 = 6 , . . . a 32 = 7 , a 33 = 123

    Key Point

    The General Matrix

    A general m n matrix A has m rows and n columns.

    The entries in the matrix are called the elements of A

    In matrix A the element in row i and column j is denoted by a ij

    A matrix with only one column is called a column vector (or column matrix), for example,x 1x 2x 3

    and345

    are both 3 1 column vectors.

    A matrix with only one row is called a row vector (or row matrix). For example [2 , 3, 8, 9] isa 1 4 row vector (often the entries in a row vector are separated by commas for clarity).

    Square matricesWhen the number of rows is the same as the number of columns, i.e. m = n , the matrix is saidto be square and of order n (or m).

    In an n n square matrix A , the leading diagonal (or principal diagonal ) is the north-west to south-east collection of elements a 11 , a 22 , . . . , a nn . The sum of the elements in theleading diagonal of A is called trace of the matrix, denoted by tr( A).

    a 11 a12 . . . a 1 na 21 a22 . . . a 2 n

    ......

    ......

    a n 1 an 2 . . . a nn

    tr( A) = a 11 + a 22 + . . . + a nnA =

    A square matrix in which all the elements below the leading diagonal are zero is called anupper triangular matrix , often denoted by U .

    U =

    u11 u12 . . . u 1 n0 u22 . . . u 2 n

    0 0...

    ...0 0 0 u

    nn

    u ij = 0 when i > j

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    4

  • 8/12/2019 7.1 Introduction to Matrices

    5/18

    A square matrix in which all the elements above the leading diagonal are zero is called alower triangular matrix , often denoted by L.

    L =

    l 11 0 0 0

    l 21 l 22 0 0......

    ... 0l n 1 l n 2 . . . l nn

    lij = 0 when i < j

    A square matrix where the only non-zero elements are along the leading diagonal is calleda diagonal matrix, often denoted by D .

    D =

    d11 0 . . . 00 d22 . . . 0...

    ......

    ...0 0 . . . d nn

    d ij = 0 when i = j

    Example A = 1 2 34 5 6 is 2 3. It is not square.

    B = 1 23 4 is 2 2. It is square. Also tr( B ) = 1 + 4 = 5.

    Matrices C =1 2 30 2 50 0 1

    and E =4 0 30 2 50 0 1

    are 3 3, square and

    upper triangular. Also tr( C ) = 0 and tr( E ) = 3.

    Matrices F =1 0 02 2 03 5 1

    and G = 1 0 0

    1 4 00 1 1

    are 3 3, square and

    lower triangular.

    Matrices D =1 0 00 2 00 0 3

    and H =4 0 00 2 00 0 0

    are 3 3, square and

    diagonal.

    5 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    6/18

    Now do this exerciseClassify the following matrices (and, where possible, nd the trace):

    A =

    1 2

    3 45 6 B =

    1 2 3 4

    5 6 7 8 1 3 2 4 C =

    1 2 3 45 6 7 89 10 11 12

    13 14 15 16

    Answer

    Now do this exerciseClassify the following matrices:

    A =1 1 11 1 1

    1 1 1

    B =1 0 01 1 0

    1 1 1

    C =1 1 10 1 1

    0 0 1

    D =1 0 00 1 0

    0 0 1Answer

    Equality of matricesAs we noted earlier, the terms in a matrix are called the elements of the matrix.

    The elements of the matrix A = 1 2 1 4 are 1, 2, 1, 4

    We say two matrices A, B are equal to each other only if A and B have the same number of rows and the same number of columns and if each element of A is equal to the correspondingelement of B . When this is the case we write A = B . For example if the following two matricesare equal:

    A = 1

    1 B = 1 2 1 4

    then we can conclude that = 2 and = 4.

    The unit matrixThe unit matrix or the identity matrix , denoted by I n (or, often, simply I ), is the diagonal

    matrix of order n in which all diagonal elements are 1.

    Hence, for example, I 2 = 1 00 1 and I 3 =1 0 00 1 00 0 1

    .

    The zero matrixThe zero matrix or null matrix is the matrix all of whose elements are zero. There is a zeromatrix for every size. For example the 2 3 and 2 2 cases are:

    0 0 0

    0 0 0 , 0 0

    0 0.

    Zero matrices, of whatever size, are denoted by 0.

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    6

  • 8/12/2019 7.1 Introduction to Matrices

    7/18

    The transpose of a matrixThe transpose of a matrix A is a matrix where the rows of A become the columns of the newmatrix and the columns of A become its rows. For example

    A = 1 2 34 5 6 becomes1 42 53 6

    The resulting matrix is called the transposed matrix of A and denoted AT . In the previousexample it is clear that AT is not equal to A since the matrices are of different sizes. If A issquare n n then AT will also be n n .

    Example If B is1 2 34 5 67 8 9

    then B T is1 4 72 5 83 6 9

    Both matrices are 3 3 but B and B T are clearly different.

    When the transpose of a matrix is equal to the original matrix i.e. AT = A, then we say thatthe matrix A is symmetric .In the previous example B is not symmetric.

    Example If C =1 2 3

    2 4 53 5 6

    then C T =1 2 3

    2 4 53 5 6

    .

    Clearly C T = C and C is a symmetric matrix. Notice how the leading diagonalacts as a mirror; for example c12 = 2 and c21 = 2. In general cij = c jifor a symmetric matrix.

    Now do this exerciseFind the transpose of each of the following matrices. Which are symmetric?

    A = 1 2

    3 4, B = 1 1

    1 1 C = 1 1

    1 0 D =

    1 24 57 8

    E = 1 0

    0 1

    Answer

    3. Addition and Subtraction of matricesUnder what circumstances can we add two matrices i.e. dene A + B for given matrices A, B ?

    ConsiderA = 1 2

    3 4 and B = 5 6 9

    7 8 10There is no sensible way to dene A + B in this case since A and B are different sizes.

    7 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    8/18

    However, if we consider matrices of the same size then addition can be dened in a very natural

    way. Consider A = 1 23 4 and B = 5 67 8 . The natural way to add A and B is to add

    corresponding elements together:

    A + B = 1 + 5 2 + 63 + 7 4 + 8 =

    6 810 12

    In general if A and B are both m n matrices, with elements a ij and bij respectively, then theirsum is a matrix C , also m n , (written C = A + B ) such that the elements of C are

    cij = a ij + bij i = 1 , 2, . . . , m j = 1 , 2, . . . , n

    In the above example

    c11 = a 11 + b11 = 1 + 5 = 6 c21 = a 21 + b21 = 3 + 7 = 10 and so on

    Subtraction of matrices follows along similar lines:

    D = A B = 1 5 2 63 7 4 8 =

    4 4 4 4

    Multiplication of a matrix by a numberThere is also a natural way of dening the product of a matrix with a number. Using the matrixA above, we note that

    A + A = 1 23 4 + 1 23 4 =

    2 46 8

    What we see is that 2 A (which is the shorthand notation for A + A) is obtained by multiplyingevery element of A by 2.

    In general if A is an m n matrix with typical element a ij then the product of a number k withA is written kA and has the corresponding elements ka ij .

    Hence, again using the matrix A above,

    7A = 7 1 23 4 = 7 1421 28

    Similarly:

    3A = 3 6 9 12

    Now do this exercise

    For the following matrices nd, where possible, A + B, A B, B A, 2A.

    1. A = 1 23 4 B = 1 11 1

    2. A =1 2 34 5 67 8 9

    B =1 1 1

    1 1 11 1 1

    3. A =1 2 34 5 6

    7 8 9

    B =1 23 4

    5 6Answer

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    8

  • 8/12/2019 7.1 Introduction to Matrices

    9/18

    4. Some simple matrix propertiesUsing the denition of matrix addition described above we can easily verify the following prop-erties of matrix addition:

    Key Point

    Properties of Matrices

    Matrix addition is commutative : A + B = B + A.

    Matrix addition is associative: A + ( B + C ) = ( A + B ) + C .

    The distributive law holds: k(A + B ) = k A + k B

    These keypoint results follow by the fact that a ij + bij = bij + a ij etc.

    We can also show that the transpose of a matrix satises the following simple properties:(A + B )T = AT + B T

    (A B )T = AT B T

    (AT )T = A.

    Example Show that ( AT )T = A for the matrix A = 1 2 34 5 6 .

    Solution

    AT =1 22 53 6

    so that ( AT )T = 1 2 34 5 6 = A

    Now do this exercise

    For the matrices A = 1 23 4 , B = 1 1 1 1 verify that

    (i) 3(A + B ) = 3A + 3 B (ii) (A B )T

    = AT

    BT

    .Answer

    9 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    10/18

    More exercises for you to try

    1. Find the coefficient matrix A of the system:

    2x 1 + 3x 2 x 3 = 1

    4x 1 + 4x 2 = 02x 1 x 2 x 3 = 0

    If B =1 2 34 5 60 0 1

    determine (3 AT B )T .

    2. If A = 1 2 34 5 6 and B = 1 40 12 7

    verify that 3( AT B ) = (3 A 3B T )T .

    Answer

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    10

  • 8/12/2019 7.1 Introduction to Matrices

    11/18

    5. Computer Exercise or Activity

    For this exercise it will be necessary for you toaccess the computer package DERIVE.

    DERIVE can be used to perform matrix algebra. Let A and B be the matrices:

    A = 1 23 4 B = 5 67 8

    To obtain the expression A + 2B using DERIVE we would rst key in the matrices usingAuthor:Matrix. Then, choosing the correct number of rows and columns, for A and then for Bimput the two matrices. DERIVE will respond

    #1 : 1 23 4

    #2 : 5 67 8

    In order to carry out matrix algebra it is advisable to give these matrices names. To do this,simply go into the Author:Expression menu screen and type A := #1 and then B := #2.DERIVE will respond:

    #3 : A := 1 23 4

    #4 : B := 5 67 8

    Now to obtain the expression A + 2B simply key in Author:Expression A + 2B =. DERIVE

    will respond;#5 : A + 2 B = 11 1417 20

    To obtain the trace of matrix A, say, simply key in TRACE( A)=. DERIVE will respond

    TRACE( A)=5

    Also the transpose of a matrix can be found. To nd the transpose of matrix A simply key inA = where is the back-accent postxed operator. DERIVE will respond

    #6 : A = 1 3

    2 4It would be a useful exercise to check all the matrix expressions in this block by using DERIVE.

    11 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    12/18

    End of Block 7.1

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    12

  • 8/12/2019 7.1 Introduction to Matrices

    13/18

    A is 3 2, B is 3 4, C is 4 4 and square. The trace is not dened for A or B . However,tr( C ) = 34.

    Back to the theory

    13 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    14/18

    A is 3 3 and square, B is lower triangular, C is upper triangular and D is diagonal

    Back to the theory

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    14

  • 8/12/2019 7.1 Introduction to Matrices

    15/18

    AT = 1 32 4 , BT = 1 11 1 C

    T = 1 11 0 = C, symmetric

    D T = 1 4 72 5 8 E T = 1 00 1 = E , symmetric

    Back to the theory

    15 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    16/18

    1. A + B = 2 34 5 A B = 0 12 3 B A =

    0 1 2 3 2A =

    2 46 8

    2. A + B =2 3 43 4 58 9 10

    A B =0 1 25 6 76 7 8

    B A =0 1 2

    5 6 7 6 7 8

    2A =2 4 68 10 12

    14 16 18

    3. None of A + B, A B, B A, are dened. 2A =2 4 68 10 12

    14 16 18

    Back to the theory

    Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

    16

  • 8/12/2019 7.1 Introduction to Matrices

    17/18

    (i) A + B = A = 2 12 5 ; 3(A + B ) = 6 36 15 3A =

    3 69 12

    3B = 3 3 3 3 ; 3A + 3 B = 6 36 15

    (ii) A B = 0 34 3 ; (A B )

    T

    = 0 43 3 , A

    T

    = 1 32 4 ,

    B T = 1 1 1 1 ; AT B T = 0 43 3

    Back to the theory

    17 Engineering Mathematics: Open Learning Unit Level 17.1: Matrices

  • 8/12/2019 7.1 Introduction to Matrices

    18/18

    1. A =2 3 14 4 02 1 1

    , AT =2 4 23 4 1

    1 0 1, 3AT =

    6 12 69 12 3

    3 0 3

    3AT

    B =

    5 10 3

    5 7 9 3 0 4 (3AT

    B )T

    =

    5 5 3

    10 7 03 9 4

    2. AT =1 42 53 6

    , AT B =2 02 41 1

    , 3(AT B ) =6 06 123 3

    B T = 1 0 24 1 7 , 3A 3BT = 3 6 912 15 18

    3 0 612 3 21 =

    6 6 30 12 3 .

    Back to the theory

    Engineering Mathematics: Open Learning Unit Level 1 18