Inverses and Elementary Matrices

Part 1.  Properties of Inverses

Enter matrices A and B:

<< LinearAlgebra`MatrixManipulation`\(A\  = 
      \ {\ {4, 36, 9, \(-1\), \(-3\)}, \ {\(-7\), \(-48\), \(-12\), 1, 4}, 

        		\ \ \ \ \ \ \ \ {2, 28, 10, \(-1\), \(-3\)}, 
        \ {5, 40, 9, \(-1\), \(-3\)}, 

        		\ \ \ \ \ \ \ \ {\(-2\), \(-7\), 9, 0, \(-1\)}\ }; \ \ \ \ \ 
    A // MatrixForm\)\(B\  = 
      \ {\ {\(-57\), \(-4\), 24, 29, \(-4\)}, \ {14, 1, \(-6\), \(-7\), 1}, 

        		\ \ \ \ \ \ \ \ {\(-3\), 0, 1, 2, 0}, 
        \ {281, 17, \(-120\), \(-145\), 20}, 

        		\ \ \ \ \ \ \ \ {\(-11\), 1, 3, 9, 0}\ }; \ \ \ \ \ \ \ \ \ \ 
    B // MatrixForm\)A.B  //  MatrixForm

Enter matrices P and Q:

P  =  { {1, 0, 1}, {1, 1, 0} };   P  //  MatrixFormQ  =  { {1, -1},  {-1, 2},  {0, 1} };   
    Q  //  MatrixForm

Enter matrices R and S:

\(R\  = 
      \ {\ {1, 2, 0, \(-1\), 2}, \ {6, 2, 8, 1, \(-1\)}, \ {4, 5, 4, 5, 1}, 

        		\ \ \ \ \ \ \ \ {5, 7, 4, 4, 3}, \ {1, 0, 1, 8, 1}\ }; \ \ 
    R // \ MatrixForm\)\(S\  = 
      \ {\ {4, 1, \(-3\), 2, 6}, \ {0, 1, 5, 2, 1}, \ {3, 8, \(-11\), 4, 6}, 
        
		\ \ \ \ \ \ \ \ {2, 1, \(-8\), 7, 2}, 
        \ {1, 3, \(-1\), 4, 8}\ }; \ \ S\  // \ MatrixForm\)

RowReduce[R] // MatrixFormRowReduce[S] // MatrixForm

Part 2.  Elementary Matrices and Row Operations

Create basic unit vectors and 4 x 4 identity matrix:

e1  =  {1, 0, 0, 0}e2  =  {0, 1, 0, 0}e3  =  {0, 0, 1, 0}e4  =  {0, 0, 0, 1}I4  =  IdentityMatrix[4];   I4  //  MatrixForm

Create elementary matrices from I4:

\(E1\  = \ I4; 

    E1[\([4]\)]\  = \ E1[\([1]\)]\ *\ \((\(-3\))\)\  + \ E1[\([4]\)]; \ \ 
    E1\  // \ MatrixForm\)

\(E2\  = \ I4; 
temp\  = \ E2[\([2]\)]; \ \ \ \ \ 
    E2[\([2]\)]\  = \ E2[\([4]\)]; \ \ \ \ \ E2[\([4]\)]\  = \ temp; 

    E2\  // \ MatrixForm\)

\(E3\  = \ I4; 
E3[\([3]\)]\  = \ E3[\([3]\)]\ *\ \((\(-5\))\); \ \ 
    E3\  // \ MatrixForm\)

Create an "empty" 4 x 4 matrix:

M  =  Array[m, {4, 4}];   M  //  MatrixForm

A  =  { {1, -2, 3}, {2, -6, 5}, {-1, -4, 0}  }; 
      A  //  MatrixForm

Use the 3 x 3 identity matrix to create elementary matrices which reduce A to an upper triangular matrix.

I3  =  IdentityMatrix[3];  I3  //  MatrixForm

Part 3.  Singular Matrices

Enter random 5 x 5 matrices and test for invertibility:

Table[Random[Integer,  {-99, 99}],  {5}, {5} ]  //  MatrixForm
      RowReduce[%]  //  MatrixForm

\(C1\  = 
      \ {{1, \(-1\), 3, 3}, {2, 4, \(-5\), 1}, {\(-7\), 1, 2, \(-4\)}, {3, 3, 
          1, 7}}; 
C1\  // \ MatrixForm\)\(C2\  = 
      \ {{3, \(-5\), a, 2}, {\(-1\), 4, b, 1}, {1, 2, c, 3}, {1, 1, d, 4}}; 

    C2\  // \ MatrixForm\)

Part 4.  Hilbert Matrices (optional)

Enter the defintion:

H  =  HilbertMatrix[6];   H  //  MatrixForm

The commands below plot vectors corresponding to the columns of the 3 x 3 Hilbert matrix.  Rotate the 3-dimensional graph (by changing the ViewPoint) to determine whether or not the vectors are coplanar.

\(\(Show[
      Graphics3D[{\ Line[\ {{0, 0, 0}, {1, 1/2, 1/3}}\ ], \ 
          Line[\ {{0, 0, 0}, {1/2, 1/3, 1/4}}\ ], \ 
          Line[\ {{0, 0, 0}, {1/3, \ 1/4, \ 1/5}}\ ]\ }], \ 
      ViewPoint -> \ {.5, 1, .5}]
\)\)

The N command converts the fractional entries of the matrix to decimal entries.

NH  = N[H];  NH //  MatrixForm

Part 5.  Summary