MATH 2050 Linear Algebra

(Section 4)
2009 Winter

Assignment 4   -   Solutions

  1. Find the basic solutions of the homogeneous linear system AX = O, where
    A = 
[ 1 2 -3 4 0  8 ]
[ 2 4 -6 9 2 16 ]
[ 0 0  0 3 6  1 ]
[ 0 0  0 1 2  0 ]
    Show that   Xp = [ 5 0 0 1 0 -1 ]T   is a solution to the inhomogeneous system   AX = B, where   B = [ 1 3 2 1 ]T.
    Hence write down the general solution of   AX = B.


    Carry the coefficient matrix   A   to reduced row-echelon form by elementary row operations:
    [reduction of A]
    [reduction of A]
    reduced matrix =
[ 1 2 -3 0 -8 0 ]
[ 0 0  0 1  2 0 ]
[ 0 0  0 0  0 1 ]
[ 0 0  0 0  0 0 ]
    The leading variables are   x1, x4 and x6.
    The other three variables are free parameters:
    x2 = s,   x3 = t     and   x5 = u,   (where s, t and u are any real numbers).
    The solution set for the homogeneous linear system can be read from the reduced row-echelon form as
    x1 = -2s + 3t + 8u ;  x4 = -2u ; x6 = 0
    The general solution for the homogeneous system is therefore
    Xh = (-2, 1, 0, 0, 0, 0)s  +  (3, 0, 1, 0, 0, 0)t
    + (8, 0, 0, -2, 1, 0)u
    The set of basic solutions then follows immediately:

    {(-2, 1, 0, 0, 0, 0),  (3, 0, 1, 0, 0, 0),
     (8, 0, 0, -2, 1, 0)}

    Substituting the given vector   Xp   into the expression   AX   we find
    AX = B
    The vector   Xp = [ 5 0 0 1 0 -1 ]T   is therefore a solution to the inhomogeneous system   AX = B
    This immediately tells us that the inhomogeneous system is consistent.
    The complete solution is the sum of this particular solution   Xp   to the inhomgeneous system with the general solution   Xh   to the associated homogeneous system:

    X = Xh + Xp


  1. Find   A -1   and hence solve   AX = B, where   A =         and  B =
[ 10 -6 ]         [ 6 ]
[  3 -2 ]         [ 2 ]


    inverse of A  =  [ 1 -3 ; 3/2 -5 ]
    This inverse is easily verified by showing that   A-1A = I   or   A A-1 = I.
    The unique solution to the linear system   AX = B is
    X  =  (invA) B

    X  =  [ 0  -1 ]T


  1. Use block multiplication to find   AB , where
    A =         and  B =
[ 2 5 0 0 0 ]    [ 8 3 0 0 0 ]
[ 1 2 0 0 0 ]    [ 3 1 0 0 0 ]
[ 0 0 1 0 0 ]    [ 0 0 3 0 0 ]
[ 0 0 0 1 0 ]    [ 0 0 0 2 0 ]
[ 0 0 0 0 1 ]    [ 0 0 0 0 1 ]


    A = [ X O ; O I ],  B = [ Y O ; O Z ]
    X = [ 2 5 ; 1 2 ],  Y = [ 8 3 ; 3 1 ]
Z = diag(3,2,1)
    AB = [ XY O ; O Z ]
    XY = [ 31 11 ; 14 5 ]
    Therefore

    AB =
[ 31 11 0 0 0 ]
[ 14  5 0 0 0 ]
[  0  0 3 0 0 ]
[  0  0 0 2 0 ]
[  0  0 0 0 1 ]


  1. Use block multiplication to find   C -1,
    C = 
[ 2 5  0  0 ]
[ 1 2  0  0 ]
[ 0 0  3 -8 ]
[ 0 0 -1  3 ]


    C = [ A O ; O B ] , where
A = [ 2 5 ; 1 2 ]  and  B = [ 3 -8 ; -8 3 ]
    invC = [ invA O ; O invB ]
    invA = [ -2 5 ; 1 -2 ]
    invA = [ 3 8 ; 1 3 ]

    invC = 
[ -2  5  0  0 ]
[  1 -2  0  0 ]
[  0  0  3  8 ]
[  0  0  1  3 ]

    One may verify this answer by direct matrix multiplication:
    C^(-1) C = I


  1. Directed Graphs   (Textbook, page 46)

    Adam Ant is visiting his four aunts at their homes that are connected by twigs as shown in this directed graph:
    [D <---> A <---> B <---> C
    and  A -> C   and   C -> C]

    There is only one twig connecting homes A and B in each direction.
    Similarly, there is one twig connecting homes B and C in each direction.
    There is one twig connecting homes D and A in each direction.
    However, Adam can travel along the other two twigs only in the directions indicated.
    In the terminology of directed graphs,
    each aunt’s home is a vertex and each twig is an edge.
    We can set up an adjacency matrix A to represent this information.

    If there is an edge from vertex j to vertex i, then the entry aij
    (in the ith row and jth column of the matrix A) is a '1'.
    If there is no edge, then the entry is a zero.

    Write down the adjacency matrix   A   for Adam Ant.


    A = 
[ 0 1 0 1 ]
[ 1 0 1 0 ]
[ 1 1 1 0 ]
[ 1 0 0 0 ]


    Furthermore, an r-path (or path of length r) from vertex j to vertex i is a sequence of r edges that starts at vertex j and ends at vertex i.   The 2-paths for Adam that start at home A and end at home C are:
    From: via:   to:  
    A C C
    A B C
    There are two 2-paths from A to C, so that the entry in row 3, column 1 of the associated matrix is '2'.
    Extend this table to find all 2-paths and hence show that the adjacency matrix for 2-paths is
            [ 2 0 1 0 ]
[ 1 2 1 1 ]
[ 2 2 2 1 ]
[ 0 1 0 1 ]
    Also show that this matrix is the square of the matrix A.


    From: via:   to:       From: via:   to:       From: via:   to:       From: via:   to:  
    A B A B A B C B A D A B
    A B C B A C C B C D A C
    A C B B A D C C B D A D
    A C C B C B C C C
    A D A B C C

    From this table, we see that from home A there is a total of five 2-paths, two of which go back to A, one to B, two to C and none to D.   This is the first column of the adjacency matrix for 2-paths.   The other three columns can be calculated in the same way.

    Verifying  2-path matrix = A^2   [tick mark]


    In general the adjacency matrix for r-paths is just Ar.
    Find the number of 3-paths from home C to itself and list all such paths.


    The number of 3-paths from home C to itself is just the (3,3) entry in the matrix A3, which is the dot product of row 3 of A2 with column 3 of A (or vice versa).   It is therefore necessary to evaluate only one of the sixteen elements of A3 !
    (3,3) entry of A^3 = 4
    These four 3-paths from home C to itself are:

      C-B-A-C
      C-B-C-C
      C-C-B-C
      C-C-C-C
     


  1. Use Gaussian elimination to find the inverse matrix of
    F = 
[ 1 -4 -6  8 ]
[ 0  2  4  6 ]
[ 0  0 -2  4 ]
[ 0  0  0 -1 ]
    (if possible; otherwise to show that no such inverse exists).


    [F|I]
    reduction of [F|I]
    reduction of [F|I]
    reduction of [F|I]
    reduction of [F|I]
    reduction of [F|I]
    reduction of [F|I]

    Inverse of F = 
[ 1  2   1  24 ]
[ 0 1/2  1   7 ]
[ 0  0 -1/2 -2 ]
[ 0  0   0  -1 ]

    It is straightforward to verify that
    F F(inverse) = I


  1. Use Gaussian elimination to find the inverse matrix of
    G = 
[ 1 2 3 4 ]
[ 2 5 6 8 ]
[ 6 7 8 9 ]
[ 4 3 2 1 ]
    (if possible; otherwise to show that no such inverse exists).


    [G|I]
    reduction of [G|I]
    At this point we can deduce that the inverse does not exist.
    The fact that rows 3 and 4 of the left hand matrix are identical tells us that the row-echelon form will have a row of all zeros in row 4.   Matrix G will therefore not reduce to the identity matrix I.   Continuing with the row operations,
    reduction of [G|I]
    reduction of [G|I]
    and now the impossibility of carrying matrix G to matrix I   by elementary row operations is obvious.   Therefore

      G-1   does not exist  


  1. Use Gaussian elimination to find the inverse matrix of
    H = 
[ 0 1 1 ]
[ 1 0 1 ]
[ 1 1 0 ]
    (if possible; otherwise to show that no such inverse exists).


    [H|I]
    reduction of [H|I]
    reduction of [H|I]
    reduction of [H|I]

    Inverse of H = 1/2 ×
[ -1  1  1 ]
[  1 -1  1 ]
[  1  1 -1 ]

    One can verify that   H-1H = H H-1 = I


      Return to the Index of Assignment Solutions   [To the Index of Assignment Solutions.]
      Back to previous page   [Return to your previous page]

      Created 2009 01 13 and most recently modified 2009 01 28 by Dr. G.H. George