MATH 2030: ASSIGNMENT 3 SOLUTIONS Matrix Operations Q.1

MATH 2030: ASSIGNMENT 3 SOLUTIONS
Matrix Operations
Q.1: pg 159, q 22. Write the system of linear equations as a matrix equation of
the form Ax = b.
−x1 + 2x3 = 1, x1 − x2 = −2, x2 + x3 = −1
A.1.

−1
1
0
0
−1
1
   
2 x1
1
0 x2  = −2 .
1 x3
−1
Q.2: pg 159, q 32. Compute AB by block multiplication using the indicated
partitioning:


0 1 0
 0 0 1 
2 3 1 0

A=
, B=
 1 5 4 .
4 5 0 1
−2 3 2
A.2. We may write A as [A0 |I2 ] where I2 is the 2 × 2 identity matrix and
2 3
0
A =
.
4 5
0 I2
Similarly B =
where 0 is the 2-component column vector, and
u B0
1
5 4
0
u=
, and B =
−2
3 2
Then the product AB becomes
[A0 0 + I2 u|A0 I2 + I2 B 0 ]
Computing the product of these individual matrices separately we find that the
product is simply
1 7 7
−2 7 7
Matrix Algebra
Q.3: pg 167, q 2. Solve the equation for X from 3X = A − 2B where A and B
are matrices:
1 2
−1 0
A=
, B=
.
3 4
1 1
1
2
MATH 2030: ASSIGNMENT 3 SOLUTIONS
A.3. Using the properties of matrix addition and scalar multiplication we may
solve for the simplest expression on the right hand side first
1 − 2(−1) 2 − 2(0)
3 2
A − 2B =
=
3 − 2(1) 4 − 2(1)
1 2
dividing by 3 gives the expression since X = 31 (A − 2B)
1 2
X = 1 23 .
3
3
Q.4: pg 167, q 14. Determine whether the three matrices are linearly independent,
1 2
5 6
1 1
,
,
.
3 4
7 8
1 1
A.4. Multiply each matrix by c1 , c2 and c3 respectively,
1 2
5 6
1 1
c1 + 5c2 + c3
2c1 + 6c2 + c3
c1
+ c2
+ c3
=
3 4
7 8
1 1
3c1 + 7c2 + c3 = 0 4c1 + 8c2 + c3
we equate the resulting matrix with the zero matrix to determine linear independence, which gives us four linear equations with augmented matrix


1 5 1 0
 2 6 1 0 


 3 7 1 0 .
4 8 1 0
Applying row reduction from top to bottom
of A is

1 5
1
 0 −4 −1

 0 0
0
0 0
0
and left to right, the row echelon form

0
0 

0 
0
it is clear that the system is consistent and that the reduced row echelon matrix
of the coefficient matrix gives c1 = c43 , c2 = − c43 and c3 is arbitrary - so the three
matrices are linearly dependent.
Q.5: pg 168, q 44. The trace of a n×n matrix A = [aij ] is the sum of the entries
on its main diagonal and is denoted by tr(A), i.e. tr(A) = a11 + a22 + ... + ann . If
A and B are n × n matrices, prove that
• tr(A + B) = tr(A) + tr(B)
• tr(kA) = ktr(A), where k is a scalar
A.5. Using the component description of matrices, the trace can be seen as Σni=1 aii ,
where A = a[aij ] is a n × n matrix. If A and B=[bij ] are the same size we may add
them together and this would be described as A + B = [aij + bij ] and so the trace
of A + B is then
tr(A + B) = Σni=1 (aii + bii ) = Σni=1 aii + Σni=1 bii = tr(A) + tr(B)
MATH 2030: ASSIGNMENT 3 SOLUTIONS
3
this can always be done as the components of A and B are finite and real-valued,
so we have proven the first identity. For the second we use the distributivity of the
real numbers to note that kA = [kaij ] and hence the trace of kA is
tr(kA) = Σni=1 kaii = k (Σni=1 aii ) = ktr(A).
Matrix Inverse
Q.6: pg 184 q 22. Solve the given matrix equation for X, you may assume that
the matrices A, B and X are invertible:
(A−1 X)−1 = (AB −1 )−1 (AB 2 ).
Simplify the expression for X as much as possible.
A.6. To start we apply the inverse operator on both sides
(A−1 X)−1 )−1 = [(AB −1 )−1 (AB 2 )]−1 → A−1 X = (AB 2 )−1 AB −1
Next we simplify the right hand side by noting (AB 2 )−1 = B −2 A−1 so that this
becomes
A−1 X = B −2 A−1 AB −1 = B −2 IB −1 = B −3 .
Finally left-multiplying by A on both sides we find that
X = AB −3 .
Q.7: pg 185, q 36,38. Find

0
0
1
the inverse of the two elementary matrices:
 

0 1
1 0 0
1 0 , 0 1 c  .
0 0
0 0 1
A.7. As the first matrix is a row interchange R2 ↔ R3 the inverse will be the
transpose which is


0 0 1
0 1 0
1 0 0
which is actually the same matrix, it is its own inverse! The second elementary
matrix corresponds to the row operation R2 +cR3 , this has an inverse row operation,
namely R2 − cR3 with corresponding elementary matrix


1 0 0
0 1 −c
0 0 1
this new elementary matrix is the inverse we are looking for.
4
MATH 2030: ASSIGNMENT 3 SOLUTIONS
The LU factorization.
Q.8: pg 195, q 4. Solve the system Ax = b using the
A,

 
 
1 0 0
2 −4 0
2 −4
1 0 × 0 5
A =  3 −1 4 =  32
−1 2 2
0 0
− 21 0 1
given LU factorization of

 
0
2
4 , b =  0  .
2
−5
A.8. To start we denote U x = y and consider the simpler problem Ly = b.
Writing yt = [y1 , y2 , y3 ] we find the following system of linear equations
y1 = 2,
1
3
y1 + y2 = 0, − y1 + y3 = −5
2
2


2
by substituting y1 into y2 and y3 we find y2 = −3 and y3 = −4, so that y = −3.
−4
Next we solve the problem U x = y, with the system of linear equations
2x1 − 4x2 = 2, 5x2 + 4x3 = −3, 2x3 = −4
Solving for x3 = −2 and substituting into the remaining two equations we find that
2x1 − 4x2 = 2 and 5x2 = 5. Onemore substitution gives the last value x1 = 3.
3
Checking we find that x =  1  is indeed a solution to the original problem
−2
Ax = b


2 2 −1
Q.9: pg 196, q 10. Find the LU factorization for the matrix 4 0 4 .
3 4 4
Q.9. Applying the row operations,
the upper triangular matrix

2
0
0
R2 − 2R1 , R3 − 23 R1 , then R3 + 14 R2 we find
2
−4
0

−1
6
7
Noting the row operations this implies the lower triangular matrix L has entries
L21 = 2, L31 = 23 and L32 = − 14 as entries below the diagonal, thus


1
0 0
1 0 ;
L = 2
3
1
−
1
2
4
and so A = LU .
Q.10: pg 196 q 16. For an invertible matrix with an LU factorization A = LU
both L and U will be invertible and so A−1 = U −1 L−1 . Find L−1 and U −1 and
then calculate A−1 for the matrix given in Q.8.
MATH 2030: ASSIGNMENT 3 SOLUTIONS
5
Q.10. To compute the inverse of L we could apply the Gauss-Jordan method and
row reduced the super augmented matrix [L|I3 until this matrix is of the form
[I3 |L−1 ]. Instead we note that if we apply the row operations R2 − 32 R1 , R3 + 32 R1 ,
we may transform L into I3 . By recording these operations as elementary matrices
and computing their product E = E3 E2 E1 we find that EL = I and so


1 0 0
L−1 = − 23 1 0
1
0 1
2
To compute the inverse of U we row reduce the super augmented matrix [U |I3 ]
until U is in reduced row echelon form (the identity matrix since it’s invertible),
i.e. [In |U −1 ]
1 2

− 45
2
5
U −1 =  0 15 − 25 
1
0 0
2
Computing the inverse A−1 = U −1 L−1 we find

 1 2
− 2 5 − 45
A−1 = − 12 15 − 25 
1
1
0
4
2
References
[1] D. Poole, Linear Algebra: A modern introduction - 3rd Edition, Brooks/Cole (2012).