Tutorial 4 - MATRIX and LINEAR - DE - WITH SOLUTION 2020
Tutorial 4 - MATRIX and LINEAR - DE - WITH SOLUTION 2020
1. Let
a b c
A = d e f if det( A) = −7 .
g h i
a g d
Compute (i) det ( 2 A ) (ii) b
−1
h e .
c i f
[Ans: i) -1/56 ii) 7 ]
Solution:
(i)
1 1 1 −1
det ( 2 A ) =
−1
= 3 = 3 =
det(2 A) 2 det( A) 2 ( −7) 56
(ii)
a g d a b c
b h e = g h i property (a)
c i f d e f
a b c
= −1 d e f interchanging the 2nd and 3rd rows
g h i
= − det( A) = 7
2. Solve
Now substitute
Similarly,
3. Solve the system of linear equations by reducing the augmented matrix to its row echelon
form.
x1 – 2x2 + x3 = –5
2x1 + x2 – x3 = –2
x1 + 3x2 + x3 = 0
1 −2 1 −5
[Ans: 0 1 0 1 ]
0 0 1 −1
Solution
The augmented matrix is
1 −2 1 −5 1 −2 1 −5 1 −2 1 −5
2 1 −1 −2 ⎯⎯⎯⎯⎯
R 2 − 2 R1 R 2
→ 0 5 −3 8 ⎯⎯⎯⎯→ 0 5 −3 8
R 3− R 2 R 3
R 3− R1 R 3
1 3 1 0 0 5 0 5 0 0 3 −3
1 −2 1 −5 1 1 −2 1 −5
R 2 + R 3 R 2
⎯⎯⎯⎯⎯
→ 0 5 0 5 ⎯⎯⎯⎯
5
R 2 R 2
→ 0 1 0 1
1
R 3 R 3
0 0 3 −3 3 0 0 1 −1
1 1 1
4.Compute A −1
, given A = 2 0 −1 .
0 1 1
1 0 −1
[Ans: A −1
= −2 1 3 ]
2 −1 −2
Solution
First, we form the augmented matrix A I and perform row operations on A I so that the
Thus we have,
1 1 1 1 0 0 1 1 1 1 0 0
2 0 −1 0 1 0 → 0 −2 −3 −2 1 0
0 1 1 0 0 1 0 1 1 0 0 1
1 1 1 1 0 0 1 1 1 1 0 0
→ 0 −2 −3 −2 1 0 → 0 −2 −3 −2 1 0
0 0 −1 −2 1 2 0 0 1 2 −1 −2
1 1 1 1 0 0 1 1 1 1 0 0
→ 0 −2 0 4 −2 −6 → 0 1 0 −2 1 3
0 0 1 2 −1 −2 0 0 1 2 −1 −2
1 0 1 3 −1 −3 1 0 0 1 0 −1
→ 0 1 0 −2 1 3 → 0 1 0 −2 1 3
0 0 1 2 −1 −2 0 0 1 2 −1 −2
1 0 −1
A −1
= −2 1 3
2 −1 −2
x1 + x 2 + x 3 = 2
2x 1 – x3 = 0
x2 + x3 = 1
1
[ Ans: x = −1 ]
2
Solution
1 1 1 x1 2
2 0 −1 x = 0
2
0 1 1 x3 1
since this system has the coefficient matrix the same as matrix A of Example 2 above,
2 x1
and b = 0 , x = x2 ; so that Ax = b. Hence, the solution is
1 x3
1 0 −1 2 1
x=A −1
b = −2 1 3 0 = −1
2 −1 −2 1 2
1 2 − 3
6. Using Gauss Jordon reduction method ,find the inverse of A = 1 −2 1 if
5 −2 − 3
it exists.
0 −1/ 4 1/ 4
[Ans: 0 −5 / 8 1/ 8 ]
1 3 / 2 −1/ 2
Solution:
Form the augmented matrix
1 2 −3 1 0 0
0 1 0 .
A | I3 = 1 −2 1
5 −2 −3 0 0 1
And the transformed matrix in reduced row echelon form is
1 0 −1 0 −1/ 4 1/ 4
0 1 −1 0 −5 / 8 1/ 8
0 0 0 1 3 / 2 −1/ 2
Solution
The augmented matrix is
1 −1 1 2 1 −1 1 2
−1 3 −1 0 ⎯⎯⎯⎯→
R 2 + R1 R 2 0 2 0 2
1 1 2 6 1 1 2 6
1 −1 1 2 1 −1 1 2
R 3− R1 R 3 R 3− R 2 R 3
⎯⎯⎯⎯→ 0 2 0 2 ⎯⎯⎯⎯→ 0 1 0 1
1
R 2 R 2
0 2 1 4 2
0 0 1 2
At this stage, the matrix obtained is in the row echelon form, we have
x1 – x2 + x3 = 2;
x2 = 1;
and x3 = 2;
Alternatively, the augmented matrix can be further reduced to its reduced row echelon form:
1 −1 1 2 1 0 1 3 1 0 0 1
0 1 0 1 ⎯⎯⎯⎯→
R1+ R 2 R1 0 1 0 1 ⎯⎯⎯⎯
R1− R 3 R1
→ 0 1 0 1
0 0 1 2 0 0 1 2 0 0 1 2
Solution
The augmented matrix is:
1 0 4 2 0 1 0 4 2 0 1 0 4 2 0
−2 1 −2 0 1 ⎯⎯⎯⎯
R 2 R 3 R 3+ 2 R1 R 3
→ 0 1 3 1 1 ⎯⎯⎯⎯⎯ → 0 1 3 1 1
0 1 3 1 1 −2 1 −2 0 1 0 1 6 4 1
1 0 4 2 0 1 1 0 4 2 0
R 3− R 2 R 3
⎯⎯⎯⎯→ 0 1 3 1 1 ⎯⎯⎯⎯
3
R 3 R 3
→ 0 1 3 1 1
0 0 3 3 0 0 0 1 1 0
Solution
The augmented matrix is
0 1 −2 1 2 −1 1 2
2 −1 1 R1 R 2
2 ⎯⎯⎯→
0 1 −2 1
4 −1 0 −4 4 −1 0 −4
2 −1 1 2 2 −1 1 2
→ 0 1 −2 1 ⎯⎯⎯⎯→ 0 1 −2 1
⎯⎯⎯⎯⎯
R 3− 2 R1 R 3 R 3− R 2 R 3
0 1 −2 −8 0 0 0 −9
2 −1 1 2
Clearly on further reduction, we have 0 1 −2 1 .
0 0 0 1
As usual, we can write out the equivalent system of linear equations from the last augmented
matrix as:
2x – y + z = 2
0x + y – 2z = 1
0x + 0y + 0z = 1 .
Solution:
8.
Solution:
12. a) Suppose you are required to solve the matrix equation Ax=b. Use Crout's factorization
and write down the LU for A .
1 1 −1 1
A = 3 4 −2 and b = 2
−2 1 3 0
1 0 0 1 1 −1
[ans: LU = 3 1 0 0 1 1 ]
−2 3 −2 0 0 1
1 0 0 1 1 −1
b) Convert the LU into Dolittle’s decomposition [ans: LU = 3 1 0 0 1 1 ]
−2 3 1 0 0 −2
−3
3
c) Solve the Ax=b [ans: x = ]
2
−5
2
Solution:
1 1 −1 1 0 0 1 1 −1
a.) A = 3 4 −2 = LU = 3 1 0 0 1 1
−2 1 3 −2 3 −2 0 0 1
1 1 −1 1 0 0 1 1 −1
b) A = 3 4 −2 = LU = 3 1 0 0 1 1
−2 1 3 −2 3 1 0 0 −2
−3
3
c) x =
2
−5
2
13. Find the eigenvalues and the corresponding eigenvectors for each of the following
matrices.
0 1 0 2 1 0
3 2 0 0 1 −1 0 1
a. 4 1 b. c.
0 0 0 1 3 1
[ans:
1 1
− −
a) 1= 5 and 2 = −1 and 2 = 2 .
1
1
b) 1= 2 = 3= 0 and 0
= 0 .
0
0
1
4
1
c) 1= −1, 2 = 3= 2 and − = −3 .]
3 1
4 4
4
Solution:
Using the characteristic equation, we have
det ( A − I ) = 0
3 2 0
det − =0
4 1 0
3− 2
Thus, det
1 −
=0
4
3− 2
We obtain =0
4 1−
2 − 4 − 5 = 0
( − 5) ( + 1) = 0
( A − I )x = 0
We have, by replacing = 5 ,
3 2 1 0
A − I = – 5
4 1 0 1
−2 2
=
4 −4
−2 2 0 −1 1 0
we have ⎯⎯
→
4 −4 0 0 0 0
− x1 = − x2 , x1 =
x 1 1
Thus, x = 1 = = . 1 is an eigenvector .
x2 1
3 2 1 0
A − I = – (–1)
4 1 0 1
4 2
=
4 2
( A − I )x = 0
4 2 0 2 1 0
We have, ⎯⎯
→
4 2 0 0 0 0
1 1
x1 = − x2 , x1 = −
2 2
1 1 1
x1 − − − 2 is an eigenvector.
Thus, x = = 2 = 2 .
x2
1 1
0 1 0 0 0
det 0 0 1 − 0 0 = 0
0 0 0 0 0
− 1 0
that is 0 − 1 =0
0 0 −
− 1
( − ) =0
0 −
(− )( 2 − 0) = 0
3 = 0
that is Ax = 0 .
0 1 0 1 0 0
0 0 1 – 0 0 1 0 = 0
0 0 0 0 0 1
0 1 0 0 0 0 0 0
0 0 1 0 ⎯⎯
→ 0 1 0 0
0 0 0 0 0 0 1 0
1 1
Thus, we have x = 0 = 0 .
0 is an eigenvector.
0 0 0
2 1 0 0 0
−1 0 1 − 0 0
det =0
1 3 1 0 0
2− 1 0
that is −1 − 1 =0
1 3 1−
− 1 −1 1
(2 − ) − =0
3 1− 1 1−
(2 − )(− + 2 − 3) − ( − 1 − 1) = 0
(2 − )(− + 2 − 3) − ( − 1 − 1) = 0
3 − 3 2 + 4 = 0
( + 1)( 2 − 4 + 4) = 0
that is Ax = 0 .
2 1 0 1 0 0
−1 0 1 – (–1) 0 1 0 =0
1 3 1 0 0 1
3 1 0 0 1 3 2 0
−1 1 1 0 ⎯⎯
→ −1 1 1 0
1 3 2 0 3 1 0 0
1 3 2 0
⎯⎯
→ 0 4 3 0
0 −8 −6 0
1 3 2 0
⎯⎯
→ 0 4 3 0
0 0 0 0
3 3
x2=− x3 x 1 = −3 − x 3 − 2 x 3
4 4
3 1
x2=− x1=
4 4
1
4
1 1
Thus, we have x = − = −3 .
3 1 −3 is an eigenvector.
4 4
4 4
that is Ax = 0 .
2 1 0 1 0 0
−1 0 1 – (2) 0 1 0 = 0
1 3 1 0 0 1
0 1 0 0 1 3 −1 0
− 1 −2 1 0 → − 1 −2 1 0
⎯⎯
1 3 −1 0 0 1 0 0
1 3 −1 0
⎯⎯
→ 0 1 0 0
0 1 0 0
1 3 −1 0
⎯⎯
→ 0 1 0 0
0 0 0 0
x1=
1 1
Thus, we have x = 0 = 0 .
0 is an eigenvector.
1 1
3 5 7
b) 0 − 2 1
0 0 0
Solution
Since the matrix [ A] is a lower triangular matrix, the eigenvalues of [ A] are the diagonal
elements of [ A] . The eigenvalues are
1 = 6, 2 = 3, 3 = 7.5, 4 = −7.2
Solution
= 0 is an eigenvalue of [ A] , that implies [ A] is singular and is not invertible.
are
1 = −1.547, 2 = 12.33, 3 = 4.711
Solution
Since
det[ A] = 1 2 3
= − 1.547 12.33 4.711
= 89.88
5 0 0 0
20.Let A = −9 4 −1 and u = 1 . Determine an eigenvalue of this matrix A.
−6 2 1 2
[Ans: = 2 ]
Solution.
Multiplying the matrix and column vector we have
5 0 0 0 0 0
Au = −9 4 −1 1 = 2 = 2 1
−6 2 1 2 4 2
We have Au = u where = 2 . Hence = 2 is an eigenvalue of the matrix A with an
eigenvector u.
21.
SK/EUM114/MATRIX & LINEAR_DE/TUT1/2020
17
EUM114- Advanced Engineering Calculus
0 1 2
A = 2 3 0 .
0 4 5
Find the eigenvalues and the eigenvectors of A.
3
[Ans: = 6 and r 2, r R, r 0 ]
8
solution:
−1 −2
f ( ) = det(I − A) = − 2 − 3 = ( − 1) ( − 6) = 0
2
0
0 −4 −5
= 1, 1, and 6.
(i) As = 1,
− 1 1 2 x1
( A − 1 I )x = 2 2 0 x2 = 0 .
0 4 4 x3
x1 1
x = x 2 = t − 1, t R.
x3 1
Thus,
1
t − 1, t R, t 0 ,
1
are the eigenvectors associated with eigenvalue = 1.
(ii) As = 6 ,
− 6 1 2 x1
( A − 6 I )x = 2 − 3 0 x2 = 0 .
0 4 − 1 x3
x1 3
x = x2 = r 2, r R.
x3 8
Thus,
SK/EUM114/MATRIX & LINEAR_DE/TUT1/2020
18
EUM114- Advanced Engineering Calculus
3
r 2, r R, r 0 ,
8
are the eigenvectors associated with eigenvalue = 6.
1 0 4
22. i)Determine the eigenvalues of A = 0 4 0
3 5 −3
[Ans: 1 = 4, 2 = −5 and 3 = 3 ]
Solution.
We have
1 0 4 0 0 1 − 0 4
A − I = 0 4 0 − 0 0 = 0 4− 0
3 5 −3 0 0 3 −3 −
5
It is easier to remember that A − I is actually matrix A with − along the leading diagonal
(from top left to bottom right). We need to evaluate det ( A − I ) .
It will be easier to evaluate the determinant along the second row, containing the elements 0,
4 − and 0. Because it has two zeros so that we do not have to evaluate the 2 by 2
determinants associated with these zeros. From above we have
1 − 0 4
det ( A − I ) = det 0 4− 0 Row 2
3 −3 −
5
1 − 4 Expanding the
= ( 4 − ) det
3 −3 − Second Row
= ( 4 − ) (1 − )( −3 − ) − ( 3 4 ) By Determinant of 2 by 2
= ( 4 − ) ( − 1)( 3 + ) − 12 Taking Out Minus Signs
= ( 4 − ) 3 + 2 − 3 − − 12 Opening Brackets and − − = +
= ( 4 − ) 2 + 2 − 15 Simplifying
= ( 4 − )( + 5 )( − 3) Factorizing
By the characteristic equation which is det ( A − I ) = 0 , means that we equate all the above
to zero:
( 4 − )( + 5)( − 3) = 0
Solving this gives the eigenvalues 1 = 4, 2 = −5 and 3 = 3 .
.ii) Determine the eigenvectors associated with 3 = 3 for the matrix A given in the above.
x 2s 2
[Ans: u = y = 0 = s 0 ]
z s 1
Solution.
1 0 4
Substituting the eigenvalue 3 = = 3 and the matrix A = 0 4 0 into ( A − I ) u = O
3 5 −3
(subtract 3 from the leading diagonal) gives:
1 − 3 0 4
( A − 3I ) u = 0 4 − 3 0 u = O
3 −3 − 3
5
where u is the eigenvector corresponding to 3 = 3 .
What is the zero vector, O, equal to?
0 x
Remember this zero vector is O = 0 and also let u = y . Substituting these into the above
0 z
and simplifying gives
−2 0 4 x 0
0 1 0 y = 0
3 5 −6 z 0
Expanding this yields the linear system
−2 x + 0 + 4 z = 0 ( †)
0+ y+0 = 0 ( ††)
3x + 5 y − 6 z = 0 ( ††† )
From the middle equation ( ††) we have y = 0 . From the top equation ( † ) we have
2 x = 4 z which gives x = 2 z
If z = 1 then x = 2 ; or more generally if z = s then x = 2s where s 0 [Not Zero].
x 2s 2
The general eigenvector u = y = 0 = s 0 where s 0 and corresponds to 3 = 3 .
z s 1
[Ans: ]
Solution
So, the first thing that we need to do is find the eigenvalues for the matrix.
Now, we need to find the constants. To do this we simply need to apply the initial conditions.
[Ans:
Solution
SK/EUM114/MATRIX & LINEAR_DE/TUT1/2020
22
EUM114- Advanced Engineering Calculus
Now find ,
Note that we didn’t use t=0 this time! We now need to solve the following system,
[Ans: ]
Solution:
As with the first example multiply cosines and signs into the vector and split it up. Don’t
forget about the exponential that is in the solution this time.