introduction and basic operations

Upload: orange-clover

Post on 09-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Introduction and Basic Operations

    1/26

  • 8/7/2019 Introduction and Basic Operations

    2/26

    To make sure that the reader knows what these numbers mean, you should be able togive the Health-expenses for family A and Food-expenses for family B during themonth of February. The answers are 250 and 600. The next question may sound easy

    to answer, but requires a new concept in the matrix context. Indeed, what is the

    matrix-expense for the two families for the first quarter? The idea is to add the threematrices above. It is easy to determine the total expenses for each family and each

    item, then the answer is

    So how do we add matrices? An approach is given by the above example. The answer

    is to add entries one by one. For example, we have

    Clearly, if you want to double a matrix, it is enough to add the matrix to itself. So we

    have

    which implies

    This suggests the following rule

    and for any number , we will have

  • 8/7/2019 Introduction and Basic Operations

    3/26

    Let us summarize these two rules about matrices.

    Addition of Matrices: In order to add two matrices, we add the entries one by

    one.

    Note: Matrices involved in the addition operation must have the same size.Multiplication of a Matrix by a Number: In order to multiply a matrix by a

    number, you multiply every entry by the given number.

    Keep in mind that we always write numbers to the left and matrices to the right (in the

    case of multiplication).

    What about subtracting two matrices? It is easy, since subtraction is a combination of

    the two above rules. Indeed, ifMand Nare two matrices, then we will write

    M-N= M+ (-1)N

    So first, you multiply the matrix Nby -1, and then add the result to the matrix M.

    Example. Consider the three matrices J, F, and M from above. Evaluate

    Answer. We have

    and since

    we get

  • 8/7/2019 Introduction and Basic Operations

    4/26

    To compute J-M, we note first that

    Since J-M= J+ (-1)M, we get

    And finally, forJ-F+2M, we have a choice. Here we would like to emphasize the fact

    that addition of matrices may involve more than one matrix. In this case, you may

    perform the calculations in any order. This is called associativity of the operations.So first we will take care of -Fand 2M to get

    Since J-F+2M= J+ (-1)F+ 2M, we get

    So first we will evaluate J-F to get

    to which we add 2M, to finally obtain

  • 8/7/2019 Introduction and Basic Operations

    5/26

    For the addition of matrices, one special matrix plays a role similar to the numberzero. Indeed, if we consider the matrix with all its entries equal to 0, then it is easy to

    check that this matrix has behavior similar to the number zero. For example, we have

    and

    What about multiplying two matrices? Such operation exists but the calculations

    involved are complicated. On the next page, we will discuss matrix multiplication.

    Multiplication of Matrices

    Before we give the formal definition of how to multiply two matrices, we will discussan example from a real life situation. Consider a city with two kinds of population: theinner city population and the suburb population. We assume that every year 40% of

    the inner city population moves to the suburbs, while 30% of the suburb population

    moves to the inner part of the city. Let I (resp. S) be the initial population of the inner

    city (resp. the suburban area). So after one year, the population of the inner part is

    0.6 I+ 0.3 S

    while the population of the suburbs is

    0.4 I+ 0.7 S

    After two years, the population of the inner city is

    0.6 (0.6 I+ 0.3 S) + 0.3 (0.4 I+ 0.7 S)

  • 8/7/2019 Introduction and Basic Operations

    6/26

    and the suburban population is given by

    0.4 (0.6 I+ 0.3 S) + 0.7(0.4 I+ 0.7 S)

    Is there a nice way of representing the two populations after a certain number ofyears? Let us show how matrices may be helpful to answer this question. Let us

    represent the two populations in one table (meaning a column object with two

    entries):

    So after one year the table which gives the two populations is

    If we consider the following rule (the product of two matrices)

    then the populations after one year are given by the formula

    After two years the populations are

    Combining this formula with the above result, we get

  • 8/7/2019 Introduction and Basic Operations

    7/26

    In other words, we have

    In fact, we do not need to have two matrices of the same size to multiply them.

    Above, we did multiply a (2x2) matrix with a (2x1) matrix (which gave a (2x1)

    matrix). In fact, the general rule says that in order to perform the multiplicationAB,

    whereA is a (mxn) matrix andB a (kxl) matrix, then we must have n=k. The result

    will be a (mxl) matrix. For example, we have

    Remember that though we were able to perform the above multiplication, it is not

    possible to perform the multiplication

    So we have to be very careful about multiplying matrices. Sentences like "multiply

    the two matricesA andB" do not make sense. You must know which of the twomatrices will be to the right (of your multiplication) and which one will be to the left;

    in other words, we have to know whether we are asked to perform

    or . Even if both multiplications do make sense (as in the case of square

    matrices with the same size), we still have to be very careful. Indeed, consider the two

    matrices

    We have

  • 8/7/2019 Introduction and Basic Operations

    8/26

    and

    So what is the conclusion behind this example? The matrix multiplication is notcommutative, the order in which matrices are multiplied is important. In fact, this little

    setback is a major problem in playing around with matrices. This is something that

    you must always be careful with. Let us show you another setback. We have

    the product of two non-zero matrices may be equal to the zero-matrix.

    Algebraic Properties of Matrix Operations

    In this page, we give some general results about the three operations: addition,

    multiplication, and multiplication with numbers, called scalar multiplication.

    From now on, we will not write (mxn) but mxn.

    Properties involving Addition. LetA,B, and Cbe mxn matrices. We have

    1.

    A+B =B+A

    2.(A+B)+C=A + (B+C)

    3.

    where is the mxn zero-matrix (all its entries are equal to 0);

    4.

  • 8/7/2019 Introduction and Basic Operations

    9/26

    if and only ifB = -A.

    Properties involving Multiplication.

    1.LetA,B, and Cbe three matrices. If you can perform the productsAB,

    (AB)C,BC, andA(BC), then we have

    (AB)C=A (BC)

    Note, for example, that ifA is 2x3,B is 3x3, and Cis 3x1, then the above

    products are possible (in this case, (AB)Cis 2x1 matrix).

    2.

    If and are numbers, andA is a matrix, then we have

    3.

    If is a number, andA andB are two matrices such that the product is

    possible, then we have

    4.

    IfA is an nxm matrix and the mxk zero-matrix, then

    Note that is the nxk zero-matrix. So if n is different from m, the two zero-matrices are different.

    Properties involving Addition and Multiplication.

    1.

    LetA,B, and Cbe three matrices. If you can perform the appropriate products,

    then we have

    (A+B)C=AC+BC

  • 8/7/2019 Introduction and Basic Operations

    10/26

    and

    A(B+C) =AB +AC

    2.

    If and are numbers,A andB are matrices, then we have

    and

    Example. Consider the matrices

    Evaluate (AB)CandA(BC). Check that you get the same matrix.

    Answer. We have

    so

    On the other hand, we have

  • 8/7/2019 Introduction and Basic Operations

    11/26

    so

    Example. Consider the matrices

    It is easy to check that

    and

    These two formulas are called linear combinations. More on linear combinations willbe discussed on a different page.

    We have seen that matrix multiplication is different from normal multiplication(between numbers). Are there some similarities? For example, is there a matrix which

    plays a similar role as the number 1? The answer is yes. Indeed, consider the nxn

    matrix

  • 8/7/2019 Introduction and Basic Operations

    12/26

    In particular, we have

    The matrix In has similar behavior as the number 1. Indeed, for any nxn matrixA, wehave

    A In = InA =A

    The matrix In is called the Identity Matrix of order n.

    Example. Consider the matrices

    Then it is easy to check that

    The identity matrix behaves like the number 1 not only among the matrices of the

    form nxn. Indeed, for any nxm matrixA, we have

  • 8/7/2019 Introduction and Basic Operations

    13/26

    In particular, we have

    Invertible Matrices

    Invertible matrices are very important in many areas of science. For example,decrypting a coded message uses invertible matrices (see the coding page). The

    problem of finding the inverse of a matrix will be discussed in a different page

    (clickhere).

    Definition. An matrixA is called nonsingular orinvertible iff there exists

    an matrixB such that

    whereIn is the identity matrix. The matrix

    Bis called the inverse matrix of

    A.

    Example. Let

    One may easily check that

    HenceA is invertible andB is its inverse.

    Notation. A common notation for the inverse of a matrixA isA-1. So

  • 8/7/2019 Introduction and Basic Operations

    14/26

    Example. Find the inverse of

    Write

    Since

    we get

    Easy algebraic manipulations give

    or

  • 8/7/2019 Introduction and Basic Operations

    15/26

    The inverse matrix is unique when it exists. So ifA is invertible, thenA-1 is also

    invertible and

    The following basic property is very important:

    IfA andB are invertible matrices, then is also invertible and

    Remark. In the definition of an invertible matrixA, we used both and to

    be equal to the identity matrix. In fact, we need only one of the two. In other words,

    for a matrixA, if there exists a matrixB such that , thenA is invertible

    andB =A-1.

    Special Matrices: Triangular, Symmetric,Diagonal

    We have seen that a matrix is a block of entries or two dimensional data. The size of

    the matrix is given by the number of rows and the number of columns. If the two

    numbers are the same, we called such matrix a square matrix.

    To square matrices we associate what we call the main diagonal (in short thediagonal). Indeed, consider the matrix

  • 8/7/2019 Introduction and Basic Operations

    16/26

    Its diagonal is given by the numbers a and d. For the matrix

    its diagonal consists ofa, e, and k. In general, ifA is a square matrix of order n and

    ifaij is the number in the ith-row and jth-colum, then the diagonal is given by the

    numbers aii, fori=1,..,n.

    The diagonal of a square matrix helps define two type of matrices: upper-triangular and lower-triangular. Indeed, the diagonal subdivides the matrix into two

    blocks: one above the diagonal and the other one below it. If the lower-block consists

    of zeros, we call such a matrix upper-triangular. If the upper-block consists of zeros,

    we call such a matrix lower-triangular. For example, the matrices

    are upper-triangular, while the matrices

    are lower-triangular. Now consider the two matrices

    The matricesA andB are triangular. But there is something special about these two

    matrices. Indeed, as you can see if you reflect the matrixA about the diagonal, you getthe matrixB. This operation is called the transpose operation. Indeed, letA be a nxm

    matrix defined by the numbers aij, then the transpose ofA, denotedATis the mxn

    matrix defined by the numbers bij where bij = aji. For example, for the matrix

  • 8/7/2019 Introduction and Basic Operations

    17/26

    we have

    Properties of the Transpose operation. IfX

    andY

    are mxn matrices andZ

    is an nxkmatrix, then

    1.

    (X+Y)T= XT+ YT2.

    (XZ)T= ZTXT

    3.(XT)T= X

    A symmetric matrix is a matrix equal to its transpose. So a symmetric matrix mustbe a square matrix. For example, the matrices

    are symmetric matrices. In particular a symmetric matrix of order n, contains at

    most different numbers.

    A diagonal matrix is a symmetric matrix with all of its entries equal to zero exceptmay be the ones on the diagonal. So a diagonal matrix has at most n different

    numbers. For example, the matrices

  • 8/7/2019 Introduction and Basic Operations

    18/26

    are diagonal matrices. Identity matrices are examples of diagonal matrices. Diagonal

    matrices play a crucial role in matrix theory. We will see this later on.

    Example. Consider the diagonal matrix

    Define the power-matrices ofA by

    Find the power matrices ofA and then evaluate the matrices

    forn=1,2,....

    Answer. We have

    and

    By induction, one may easily show that

  • 8/7/2019 Introduction and Basic Operations

    19/26

    for every natural numbern. Then we have

    forn=1,2,..

    Scalar Product. Consider the 3x1 matrices

    The scalar product ofXand Y is defined by

    In particular, we have

    XTX= (a2 + b2 + c2). This is a 1 x 1 matrix .

    Elementary Operations for Matrices

    Elementary operations for matrices play a crucial role in finding the inverse or solvinglinear systems. They may also be used for other calculations. On this page, we will

    discuss these type of operations. Before we define an elementary operation, recall thatto an nxm matrixA, we can associate n rows and m columns. For example, consider

    the matrix

  • 8/7/2019 Introduction and Basic Operations

    20/26

    Its rows are

    Its columns are

    Let us consider the matrix transpose ofA

    Its rows are

    As we can see, the transpose of the columns ofA are the rows ofAT. So the transpose

    operation interchanges the rows and the columns of a matrix. Therefore many

    techniques which are developed for rows may be easily translated to columns via the

    transpose operation. Thus, we will only discuss elementary row operations, but thereader may easily adapt these to columns.

    Elementary Row Operations.

    1.Interchange two rows.

    2.Multiply a row with a nonzero number.

  • 8/7/2019 Introduction and Basic Operations

    21/26

    3.Add a row to another one multiplied by a number.

    Definition. Two matrices are row equivalent if and only if one may be obtained from

    the other one via elementary row operations.

    Example. Show that the two matrices

    are row equivalent.

    Answer. We start with

    A. If we keep the second row and add the first to the second,we get

    We keep the first row. Then we subtract the first row from the second one multiplied

    by 3. We get

    We keep the first row and subtract the first row from the second one. We get

    which is the matrixB. ThereforeA andB are row equivalent.

    One powerful use of elementary operations consists in finding solutions to linearsystems and the inverse of a matrix. This happens via Echelon Form and Gauss-

    Jordan Elimination. In order to appreciate these two techniques, we need to discusswhen a matrix is row elementary equivalent to a triangular matrix. Let us illustrate

    this with an example.

  • 8/7/2019 Introduction and Basic Operations

    22/26

    Example. Consider the matrix

    First we will transform the first column via elementary row operations into one withthe top number equal to 1 and the bottom ones equal 0. Indeed, if we interchange the

    first row with the last one, we get

    Next, we keep the first and last rows. And we subtract the first one multiplied by 2

    from the second one. We get

    We are almost there. Looking at this matrix, we see that we can still take care of the 1

    (from the last row) under the -2. Indeed, if we keep the first two rows and add thesecond one to the last one multiplied by 2, we get

    We can't do more. Indeed, we stop the process whenever we have a matrix which

    satisfies the following conditions

    1.any row consisting of zeros is below any row that contains at least one nonzero

    number;

    2.the first (from left to right) nonzero entry of any row is to the left of the first

    nonzero entry of any lower row.

  • 8/7/2019 Introduction and Basic Operations

    23/26

    Now if we make sure that the first nonzero entry of every row is 1, we get a matrix

    in row echelon form. For example, the matrix above is not in echelon form. But if we

    divide the second row by -2, we get

    This matrix is in echelon form.

    Matrix Exponential

    The matrix exponential plays an important role in solving system of linear differentialequations. On this page, we will define such an object and show its most important

    properties. The natural way of defining the exponential of a matrix is to go back to the

    exponential function ex and find a definition which is easy to extend to matrices.

    Indeed, we know that the Taylor polynomials

    converges pointwise to ex and uniformly wheneverx is bounded. These algebraic

    polynomials may help us in defining the exponential of a matrix. Indeed, consider a

    square matrixA and define the sequence of matrices

    When n gets large, this sequence of matrices get closer and closer to a certain matrix.

    This is not easy to show; it relies on the conclusion on ex above. We write this limitmatrix as eA. This notation is natural due to the properties of this matrix. Thus we

    have the formula

  • 8/7/2019 Introduction and Basic Operations

    24/26

    One may also write this in series notation as

    At this point, the reader may feel a little lost about the definition above. To make this

    stuff clearer, let us discuss an easy case: diagonal matrices.

    Example. Consider the diagonal matrix

    It is easy to check that

    for . Hence we have

    Using the above properties of the exponential function, we deduce that

    Indeed, for a diagonal matrixA, eA can always be obtained by replacing the entriesofA (on the diagonal) by their exponentials. Now letB be a matrix similar toA. As

    explained before, then there exists an invertible matrixPsuch that

    B =P-1AP.

    Moreover, we have

  • 8/7/2019 Introduction and Basic Operations

    25/26

    Bn =P-1AnP

    for , which implies

    This clearly implies that

    In fact, we have a more general conclusion. Indeed, letA andB be two square

    matrices. Assume that . Then we have . Moreover, ifB =P-1AP,

    then

    eB =P-1eAP.

    Example. Consider the matrix

    This matrix is upper-triangular. Note that all the entries on the diagonal are 0. These

    types of matrices have a nice property. Let us discuss this for this example. First, note

    that

    In this case, we have

  • 8/7/2019 Introduction and Basic Operations

    26/26

    In general, letA be a square upper-triangular matrix of order n. Assume that all its

    entries on the diagonal are equal to 0. Then we have

    Such matrix is called a nilpotent matrix. In this case, we have

    As we said before, the reasons for using the exponential notation for matrices reside in

    the following properties:

    Theorem. The following properties hold:

    1.

    ;

    2.ifA andB commute, meaningAB =BA, then we have

    eA+B = eAeB;

    3.for any matrixA, eA is invertible and