Solutions of Tutorial 01: Matrices and Determinats
Exercice 01:
Let the following matrices be:
2 −1 1 −1
2 3 4 5 −1
A = 1 3 2 , B = 3 , C = ,D=
0 −1 −1 1 0
0 3 1 1
3 2
E=
2 5
1. Calculate if it is possible:
A + I3 ; 2D − 3E ; E − I2 ; C + D ; E + D ; C 2 ; D2 ; B 2 ; C ×
D ; D×C
C ×B ; B×C ; A×B ; B×A .
2. Determine the transposes:
At ; B t ; C t ; (E + D)t ; (C × B)t .
Solution of Exercice 01:
1 0 ··· 0
0 1 · · · 0
1. Reminder : Identity / Unit matrix In = .. ..
. . . . . ...
0 0 ··· 1
n×n
2 −1 1 1 0 0 3 −1 1
• A + I3 = 1 3 2 + 0 1 0 = 1 4 2
0 3 1 3×3 0 0 1 3×3 0 3 2
1
5 −1 3 2
• 2D − 3E = 2 −3
1 0 2×2
2 5 2×2
10 −2 9 6 1 −8
= − =
2 0 6 15 −4 −15
3 2 1 0 3−1 2−0
• E − I2 = − = =
2 5 2×2 0 1 2×2 2−0 5−1
2 2
2 4
2 3 4 5 −1
• C +D = +
0 −1 −1 2×3 1 0 2×2
is not possible because C and D have not the same dimension
3 2 5 −1 8 1
• E+D = + =
2 5 2×2 1 0 2×2 3 5
2 3 4 2 3 4
• C2 = C × C = ×
0 −1 −1 2×3 0 −1 −1 2×3
is not possible because the number of columns of matrix C is
defrent to number of rows of matrix C(the columns and
the rows of the matrix C is not equal)
5 −1 5 −1
• D2 = D × D = ×
1 0 2×2 1 0 2×2
5 × 5 + (−1) × 1 −1 × 5 + (−1) × 0
=
1×5+0×1 1 × (−1) + 0 × 0 2×2
25 − 1 −5 + 0 24 −5
= =
5 + 0 −1 + 0 2×2 5 −1 2×2
2
−2 −2
2
• B =B×B = 3 × 3 is not possible
1 3×1 1 3×1
2 3 4 5 −1
• C ×D = × is not possible
0 −1 −1 1 0
5 −1 2 3 4 10 16 21
• D×C = × =
1 0 0 −1 −1 2 3 4 2×3
−2
2 3 4 9
• C ×B = × 3 =
0 −1 −1 2×3 −4 2×1
1 3×1
−2
2 3 4
• B×C = 3 × is not possible
0 −1 −1 2×3
1 3×1
2 −1 1 −2 −6
• A × B = 1 3 2 × 3 = 9
0 3 1 3×3 1 3×1 10 3×1
−2 2 −1 1
• B × A = × 3 × 1 3 2 is not possible
1 3×1 0 3 1 3×3
2. Determine the transposes:
t
2 −1 1 2 1 0
• At = 1 3 2 = −1 3 3
0 3 1 3×3 1 2 1 3×3
t
−2
t
• B = 3 = −2 3 1 1×3
1 3×1
t 2 0
2 3 4
• Bt = = 3 −1
0 −1 −1 2×3
4 −1 3×2
3
8 1 8 3
• Method 01: (E + D)t = =
3 5 2×2 1 5 2×2
t 3 2
• Method 02: E = E = =⇒ Eis a symetric matrix
2 5
t
5 −1 5 1
Dt = =
1 0 −1 0
t t 3 2 5 1 8 3
E +D = + =
2 5 −1 0 1 5 2×2
t
t 9
• Method 01: (C × B) = = 9 −4 1×2
−4 2×1
2 0
Method 02: B t .C t = −2 3 1 1×3 ×3 −1 = 9 −4 1×2
4 −1 3×2
=⇒ (C × B)t = B t .C t
Exercice 02:
Given the Matrices:
x 5 y 7
A= B=
0 2x −1 3y
1. Find x and y so that:
4 12
(a) A + B =
−1 17
−5 −18
(b) 2A − 4B =
4 −16
Solution of Exercice 02:
• The sum of Matrices A and B is given by
x 5 y 7
A+B = +
0 2x 2×2 −1 3y 2×2
4
x+y 5+7 x+y 12
= =
0 − 1 2x + 3y 2×2 −1 2x + 3y 2×2
4 12
By comparing with the given matrix A + B =
−1 17
x+y 12 4 12
=
−1 2x + 3y −1 17
We can write the following system
( (
x+y =4 x=4−y
=⇒
2x + 3y = 17 2(4 − y) + 3y = 17
( (
x=4−y x = −5
=⇒
8 + y = 17 y=9
By solving this system of equations, we find x = −5 and y = 9
So the values of elements of matrices A and B for
4 12 −5 5 9 7
A+B = are A = and B =
−1 17 0 −10 −1 27
• Let’s start by calculating 2A − 4B
x 5 y 7
2A − 4B = 2 −4
0 2x −1 3y
2x 2×5 −4y −4 × 7
2A − 4B = +
2 × 0 2 × 2x −4 × (−1) −4 × 3y
2x 10 −4y −28
2A − 4B = +
0 4x 4 −12y
2x − 4y 10 − 28 2x − 4y −18
2A − 4B = =
0 + 4 4x − 12y 4 4x − 12y
5
−5 −18
We will raw equality 2A − 4B =
4 −16
So by identification
( (
2x − 4y = −5 x = 12 (−5 + 4y)
=⇒
4 21 (−5 + 4y) − 12y = −16
4x − 12y = −16
( (
1
x = 2 (−5 + 4y) x = 12 (−5 + 4y)
=⇒
−10 + 8y − 12y = −16 −4y = −16 + 10
( (
x = 21 (−5 + 4y) x = 12 (−5 + 4y)
=⇒
−4y = −6 y = 64
( (
1 3
x = 12
x = 2 − 5 + 42
=⇒
y = 32 y = 32
1 3
By solving this system of equations, we find x = 2 and y = 2
So the values of elements of matrices A and B for
1 3
−5 −18 5 7
2A − 4B = are A = 2 and B = 2 9
4 −16 0 1 −1 2
Exercice 03:
Let M = (mij )1≤i,j≤3 ∈ M3 (R)
(
1 if i + j even
With mij =
0 if i + j odd
1. Write the matrices M .
2. Calculate M 2 , M 3 , M 4 .
Solution of Exercice 03:
6
1. M = (mij )1≤i,j≤3
m11 m12 m13
M = m21 m22 m23
m31 m32 m33
For i = 1 and j = 1
m11 =⇒ 1 + 1 = 2 =⇒ 2 is even =⇒ m11 = 1
For i = 1 and j = 2
m12 =⇒ 1 + 2 = 3 =⇒ 3 is odd =⇒ m12 = 0
For i = 1 and j = 3
m13 =⇒ 1 + 3 = 4 =⇒ 4 is even =⇒ m13 = 1
For i = 2 and j = 1
m21 =⇒ 2 + 1 = 3 =⇒ 3 is odd =⇒ m21 = 0
For i = 2 and j = 2
m22 =⇒ 2 + 2 = 4 =⇒ 4 is even =⇒ m22 = 1
For i = 2 and j = 3
m23 =⇒ 2 + 3 = 5 =⇒ 5 is odd =⇒ m23 = 0
For i = 3 and j = 1
m31 =⇒ 3 + 1 = 4 =⇒ 4 is odd =⇒ m31 = 0
For i = 3 and j = 2
m32 =⇒ 3 + 2 = 5 =⇒ 5 is even =⇒ m32 = 1
For i = 3 and j = 3
m33 =⇒ 3 + 3 = 6 =⇒ 6 is odd =⇒ m33 = 0
7
So the matrix M given by
1 0 1
M = 0 1 0
1 0 1
2. Calculate M 2 , M 3 andM 4
1 0 1 1 0 1 2 0 2
2
M = M × M = 0 1 0 × 0 1 0 = 0 1 0
1 0 1 1 0 1 2 0 2
2 0 2 1 0 1 4 0 4
2
M =M ×M = 0 1 0 × 0
1 0 = 0
1 0
2 0 2 1 0 1 4 0 4
4 0 4 1 0 1 8 0 8
4 3
M = M × M = 0 1 0 × 0 1 0 = 0 1 0
4 0 4 1 0 1 8 0 8
Exercice 04:
Calculate, then compare products A × B and B × A
−1 8 4 2
1. A = and B =
2 11 −5 8
4 8 3 9
2. A = and B =
1 2 1 1
2 1 5 2
3. A = and B =
1 1 2 3
Solution of Exercice 04:
−1 8 4 2
• If A = and B =
2 11 −5 8
−1 8 4 2 −44 62
A×B = × =
2 11 −5 8 −47 92
8
4 2 −1 8 0 54
B×A= × =
−5 8 2 11 21 48
We observe that A × B 6= B × A
4 8 3 9
• If A = and B =
1 2 1 1
4 8 3 9 20 44
A×B = × =
1 2 1 1 5 11
3 9 4 8 21 42
B×A= × =
1 1 1 2 5 10
We notice that A × B 6= B × A
2 1 5 2
• If A = and B =
1 1 2 3
2 1 5 2 12 7
A×B = × =
1 1 2 3 5 7
5 2 2 1 12 7
B×A= × =
2 3 1 1 5 7
This time we see that A × B = B × A
Indeed, this is by no means a universal rule.
Exercice 05:
Calculate in the following cases A2 , A3 , A4 then deduce An n ∈ N
1 0 1 1 1 1
A = 0 0 0 , A = 1 1 1
1 0 1 1 1 1
Solution of Exercice 05:
We calculate A2 , A3 and A4 for each matrix
9
• For
1 0 1
A = 0 0 0
1 0 1
1 0 1 1 0 1 2 0 2
A2 = A × A = 0 0 0 × 0 0 0 = 0 0 0
1 0 1 1 0 1 2 0 2
1 0 1
= 2 0 0 0 = 2A
1 0 1
2 0 2 1 0 1 4 0 4
A3 = A2 × A = 0 0 0 × 0 0 0 = 0 0 0
2 0 2 1 0 1 4 0 4
2 0 2
= 2 0 0 0 = 2A2 = 2 × 2A = 22 A
2 0 2
4 0 4 1 0 1 8 0 8
A4 = A3 × A = 0 0 0 × 0 0 0 = 0 0 0
4 0 4 1 0 1 8 0 8
4 0 4
= 2 0 0 0 = 2A3 = 2 × 2A2 = 2 × 2 × 2A = 23 A
4 0 4
We can see that
An = 2n−1 A
We show by induction proof An = 2n−1 A : P (n) It suffies to prove
it in two steps
1. P (1) is true for n = 1
A1 = 21−1 A = 20 A = 1A = A
Holds
10
2. We prove the implication following P (n) =⇒ P (n + 1)
That P (n) : An = 2n−1 A is true and we prove P (n + 1) is
true (?)
An+1 = 2(n+1)−1 A = 2n A ?
An+1 = An A
An+1 = (2n−1 A)A according(?)
An+1 = 2n−1 (AA)
An+1 = 2n−1 A2 (A2 = 2A)
An+1 = 2n−1 (2A)
An+1 = 2n−1+1 A
An+1 = 2n A
Conclusion: An = 2n−1 A is true ∀n ≥ 1
• For
1 1 1
A = 1 1 1
1 1 1
1 1 1 1 1 1 3 3 3
2
A = A × A = 1 1 1 × 1 1 1 = 3 3 3
1 1 1 1 1 1 3 3 3
1 1 1
= 3 1 1 1 = 3A
1 1 1
3 3 3 1 1 1 9 9 9
3 2
A = A × A = 3 3 3 × 1 1 1 = 9 9 9
3 3 3 1 1 1 9 9 9
3 3 3
= 3 3 3 3 = 3A2 = 3 × 3A = 32 A
3 3 3
11
9 9 9 1 1 1 27 27 27
A4 = A3 × A = 9 9 9 × 1 1 1 = 27 27 27
9 9 9 1 1 1 27 27 27
9 9 9
= 3 9 9 9 = 3A3 = 3 × 3A2 = 3 × 3 × 3A = 33 A
9 9 9
We can see that
An = 3n−1 A
We show by induction proof An = 3n−1 A : P (n) It suffies to prove
it in two steps
1. P (1) is true for n = 1
A1 = 31−1 A = 30 A = 1A = A
Holds
2. We prove the implication following P (n) =⇒ P (n + 1)
That P (n) : An = 3n−1 A is true and we prove P (n + 1) is
true (??)
An+1 = 3(n+1)−1 A = 3n A ?
An+1 = An A
An+1 = (3n−1 A)A according(??)
An+1 = 3n−1 (AA)
An+1 = 3n−1 A2 (A2 = 3A)
An+1 = 3n−1 (2A)
An+1 = 3n−1+1 A
An+1 = 3n A
Conclusion: An = 3n−1 A is true ∀n ≥ 1
12
Exercice 06:
Consider the matrix:
x 1
M= with x ∈ R
2 3
6 1
• Determine x so that M 2 =
2 11
• Calculate the n-power of the following matrices
1 −1 1 1
M= S=
−1 1 0 2
Solution of Exercice 06:
x 1
1. Given matrix M =
2 3
We need
to detrmine
the value of x that satisfies the equation
6 1
M2 =
2 11
Let’s calculate M 2
2
x 1 x + 2 x + 3 x 1
M2 = M × M = × =
2 3 2x + 6 11 2 3
6 1
By comparing with the given matrix M 2 =
2 11
We get
2
x + 2 = 6
x = −2 ∨ x = 2
x+3=1 =⇒ x = −2
2x + 6 = 2 x = −2
13
6 1
Therfore, the value of x that satisfies the equation M 2 =
2 11
is x = −2
2. Calculate the n-power of the matrices M and S
1 −1
• Matrix M =
−1 1
1 −1 1 −1 2 −2
M2 = M × M = × =
−1 1 −1 1 −2 2
1 −1
=2 = 2M
−1 1
2 −2 1 −1 4 −4
M3 = M2 × M = × =
−2 2 −1 1 −4 4
2 −2
=2 = 2M 2 = 2 × 2M = 22 M
−2 2
4 3 4 −4 1 −1 8 −8
M =M ×M = × =
−4 4 −1 1 −8 8
4 −4
=2 = 2M 3 = 2 × 2M 2 = 2 × 2 × 2M = 23 M
−4 4
We notice that
M n = 2n−1 M
(We can verfy that equality using proof by induction)
1 1
• Matrix S =
0 2
2 1 1 1 1 1 3
S =S×S = × =
0 2 0 2 0 4
1 22 − 1
=
0 22
14
1 3 1 1 1 7
S3 = S2 × S = × =
0 4 0 2 0 8
1 23 − 1
=
0 23
4 3 1 7 1 1 1 15
S =S ×S = × =
0 8 0 2 0 16
1 24 − 1
=
0 24
We notice that
n
1 2 − 1
Sn =
0 2n
(We can verfy that equality using proof by induction)
Exercice 07:
Give the inverse of the following matrices using the gauss method:
2 4 2 2 −1 3
A = −1 3 2 , B = −4 2 1
−1 1 1 −2 2 1
Solution of Exercice 07:
2 4 2
• A = −1 3 2 We calculate the Inverse of the matrix A using
−1 1 1
Gaussian-Jordan elimination
A|I3 ∼ I3 |A
Step 1: pivot the first column
1
R1 = 12 R1
2 4 2 1 0 0 R1 1 2 1 2 0 0
−1 3 2 0 1 0 R2 → −1 3 2 0 1 0 R2
−1 1 1 0 0 1 R3 −1 1 1 0 0 1 R3
15
Step 2: Elimination of elements under the pivot of first column
1 2 1 12 0 0 1 2 1 21 0 0
R1 R1
−1 3 2 0 1 0 R2 → 0 5 3 1
2 1 0
R2 = R2 + R1
−1 1 1 0 0 1 R3 −1 1 1 0 0 1 R3
1 2 1 21 0 0
R1
0 5 3 1 1 0 R2
2
1
0 3 2 2 0 1 R3 = R3 + R1
Step 3: pivot the second column
1 2 1 12 0 0 1 2 1 12 0 0
R1 R1
0 5 3 1 R2 → 0 1 3 1 1 R2 = 1 R2
2 1 0 5 10 5 0 5
0 3 2 12 0 1 R3 0 3 2 0 0 1 R3
Step 4: Elimination of the element under the pivot of the second
column
1 2 1 12 0 0 1 2 1 12 0 0
R1 R1
0 1 3 1 1 R2 → 0 1 3 1 1
5 10 5 0 5 10 5 0 R2
1 1 −3
0 3 2 0 0 1 R3 0 0 5 5 5 1 R3 = R3 − 3R2
Step 5: Elimination of the element above the pivot of the second
column
1 2 1 12 0 0 1 0 −1 3 −2
R1 5 10 5 0 R1 = R1 − 2R2
0 1 3 1 1 0 R2 → 0 1 3 1 1
0 R2
5 10 5 5 10 5
1 1 −3 1 1 −3
0 0 5 5 5 1 R3 0 0 5 5 5 1 R3
Step 6: pivot the third column
1 0 −1 3 −2
1 0 −1 3 −2
5 10 5 0 R 1 5 10 0
5 R1
0 1 3 1 1
0 R2 → 0 1 3 1 1
0 R2
5 10 5 5 10 5
1 −3
0 0 15 5 5 1 R 3 0 0 1 1 −3 5 R3 = 5R3
Step 7: Elimination of elements above the pivot of third column
1 0 −1 3 −2
5 10 5 0 R1
0 1 3 1 1
5 10 5 0 R2
0 0 1 1 −3 5 R3
16
1 0 −1 3 −2
5 10 5 0 R1
−1
→0 1 0 2 2 −3 R2 = R2 − 35 R3
0 0 1 1 −3 5 R3
1 0 −1 3 −2
5 10 5 0 R1
−1
0 1 0
2 2 −3 R2
0 0 1 1 −3 5 R3
1 0 0 21 −1 1 R1 = R1 + 51 R3
→ 0 1 0 −12 2 −3 R2
0 0 1 1 −3 5 R3
So
1
2 −1 1
A−1 = −1
2 2 −3
1 −3 5
2 −1 3
• B = −4 2 1 We calculate the Inverse ofthe matrix B using
−2 2 1
Determinant
1
B −1 = adj(B)
|B|
Such that adj(B) = (Cij )t and (Cij ) = (−1)i+j |Bij |
|B| = 2(2×1−2×1)−(−1)(−4×1−(−2)1)+3(−4×2−(−2)×2) = −14
0 2 −4
(Cij ) = 7 8 −2
−7 −14 0
t
0 2 −4 0 7 −7
adj(B) = (Cij )t = 7 8 −2 = 2 8 −14
−7 −14 0 −4 −2 0
0 −1 1
0 7 −7
−1 2 2
Then B −1 = 2 8 −14 = −1 7
−4
7 1
14 2 1
−4 −2 0 7 7 0
17