Chapter One and Two
Chapter One and Two
1
1.1 Definition and properties
Determinant is a scalar value that can be calculated from a given matrix.
The matrix has to be square (same number of rows and columns).
Definition 1.1.1. Let A ∈ Mn (K), that is, the matrix A be square. Then
we define the matrix Aij as the matrix extracted from the matrix A, which
we obtain by removing the row i and the column j of the matrix A.
Example 1.1.1. Let
1 2 7
A= 0 4 −5
.
−2 −4 2
Extract the following matrices A11 , A23 , A31
4 −5 1 2 2 7
! ! !
A11 = , A23 = , A31 = .
−4 2 −2 −4 4 −5
Remark 1.1.1. It is clear that if the matrix A is of degree n, then the matrix
Aij is of degree n − 1, then
1
1.1. Definition and properties 1
3. In the general case, that is, if the matrix is of degree n, then we have
n
f (A) = (−1)i+j aij f (Aij ).
X
i,j=1
1 −1
!
A= ,
2 5
by definition, we have
det(A) =| A |= 1 × 5 − 2 × (−1) = 7.
1 2 1
A = 3 0 6 ,
−4 7 −2
we fix one of the lines or one of the columns (i.e., the choice is qualitative
and the result is the same), let it be the first line:
3
det(A) = (−1)1+j a1j det(A1j ) = a11 det(A11 ) − a12 det(A12 ) + a13 det(A13 ).
X
j=1
Note that det(A11 ) is the determinant of the matrix A11 , which we obtained
by limiting the first line (the anchored line) and the first column. det(A12 ) is
the determinant of the matrix A12 , which we obtained by limiting the first line
(the anchored line) and the second column, and det(A13 ) is the determinant
2
1.1. Definition and properties 1
of the matrix A13 , which we obtained by limiting the first line (the fixed line)
and the third column. From there, we can easily find
0 6 3 6 3 0
det(A) = 1 −2 +
7 −2 −4 −2 −4 7
= (0 × (−2) − 7 × 6) − 2(3 × (−2) − (−4) × 6) + (3 × 7 − (−4) × 0)
= −42 − 36 + 21 = −57.
Remark 1.1.3. Choosing a line or column is qualitative, and for this reason
we must choose the line or column that makes calculations easier for us, such
as choosing the line or column that contains the largest number of zeros.
so we find
a11 a12 a13 a11 a12 a11 a12 a13 a11 a12
a21 a22 a23 a21 a22 21 a22 a23 a21 a22 ,
a
a31 a32 a33 a31 a32 a31 a32 a33 a31 a32
then
det(A) = a11 × a22 × a33 + a12 × a23 × a31 + a13 × a21 × a32
− a31 × a22 × a13 − a32 × a23 × a11 − a33 × a21 × a12 .
2 1 0
1 −1 3 .
Example 1.1.4. Let’s calculate the determinant of the matrix A =
3 2 1
By the Sarrus rule:
det(A) = 2 × (−1) × 1 + 1 × 3 × 3 + 0 × 1 × 2
− 3 × (−1) × 0 − 2 × 3 × 2 − 1 × 1 × 1 = −6.
3
1.1. Definition and properties 1
From these three vectors, we define, by joining the columns, a matrix and a
determinant:
a11 a12 a13
det (v1 , v2 , v3 ) = det
a21 a22 a23 .
4
1.1. Definition and properties 1
V = |det (v1 , v2 , v3 )| .
We will see the behavior of the determinant against the elementary operations
on the columns.
2 6 1 6 2 1 2 6 1
A = 1 1 5 , B = 1 1 5 , C = 0 0 −1
,
0 0 −1 0 0 −1 1 1 5
so we have
det(A) = 4.
We note that the matrix B is a matrix resulting from the matrix A by replac-
ing the first column with the second column, and therefore
As for the matrix C, it is the result of the matrix A by replacing the second
line with the third line, and from it,
Theorem 1.1.2. The value of the determinant does not change if a linear
blend is added to any column (line) for the rest of the columns (lines).
5
1.1. Definition and properties 1
2 5 1
A = −1 2 5 ,
1 −1 −1
calculate the determinant of the matrix A and then derive the value of deter-
minant of the following matrix
8 5 1
B= 6 2 5 ,
−1 −1 −1
we have det(A) = 25. As for the matrix B, it is clear that it is the result
of the matrix A by adding the second and third columns to the first column.
Therefore, according to the previous property, det(B) = 25.
Proposition 1.1.3. Let A ∈ Mn (K) be a matrix with the columns C1 , C2 , . . . , Cn .
We note A′ is the matrix obtained by one of the elementary operations on the
columns, which are:
1. Ci ← λCi avec λ ̸= 0 : A′ is obtained by multiplying a column of A by
a non-zero scalar. Then det A′ = λ det A.
1 2 5
A = 3 6 15
−1 3 5
We note
(1, 3, −1) = −2(2, 6, 3) + (5, 15, 5),
that the columns are linearly related, then det(A) = 0.
Theorem 1.1.4. If all elements of one row or (one column) of square matrix
A are zero, then det(A) = 0.
6
1.1. Definition and properties 1
A = 2 1 −9 ,
0 0 0
we note all elements of row number 3 of matrix A equal zero, then we
have by theorem (1.1.4) det(A) = 0.
Theorem 1.1.5. If there exist two rows or two columns of a square matrix
A are equal, then det(A) = 0.
A = 2 1 −9
,
2 1 −9
by theorem (1.1.5), we get det(A) = 0, because the elements of row number
3 equal the elements of row number 2.
A = 2 1 −9 ,
2 3 4
by theorem (1.1.6), we get det(A) = 0, because row one is a double of row
three.
1 2 2 3 10 5
! ! !
A= , B= , A.B = ,
2 3 4 1 16 9
7
1.2. Finding the inverse matrix 1
,
A, B, C ≥ 0, det(A + B + C) + det C ≥ det(A + B) +
det(B + C).
Theorem 1.1.8. If A is a square matrix and a triangular matrix, then the
determinant of the matrix A is equal to the product of the elements of the
main diagonal.
Example 1.1.12. Let
1 2 3 5 0 0
A = 0 3 2 ,b = 1 2 0 ,
0 0 4 1 2 4
by theorem (1.1.8), we get det(A) = 1 × 3 × 4 = 12, det(B) = 5 × 2 × 4 =
40, because the matrices A and B are triangular matrices.
Theorem 1.1.9. if A is a square matrix, then det(A) = det(At ).
Example 1.1.13. Let
1 4 1 2
! !
A= , A =t
2 3 4 3
by theorem (1.1.9), we get, det(A) = −5 = det(At ).
Theorem 1.1.10. If A is n × n invertible matrix, then det(A−1 ) = 1
det(A)
.
8
1.2. Finding the inverse matrix 1
A= 1 2 1 .
2 −2 −1
9
Solving Linear Systems
2
2.1 Introduction
Linear algebra is an essential tool for all branches of applied mathematics, in
particular when it comes to modeling and then numerically solving problems
from various fields: physical or mechanical sciences, life sciences, chemistry ,
economics, engineering sciences,...
Linear systems are used in many application contexts because they form
the computational basis of linear algebra. They also make it possible to treat
a good part of the theory of linear algebra in finite dimensions. This is why
this course begins with a study of linear equations and their solution. This
chapter has an essentially practical goal: to solve linear systems.
2.2 Definitions
Linear equations:
a1 x1 + ...an xn = b,
2x − y + 4z − 3t = −3,
10
2.2. Definitions 2
It is a linear equation with four unknowns. We also note that the vector
(1, 0, 2, 1) from the vector space R4 is one of the solutions to the previous
equation.
2x2 + 2xy = 2,
Real-world applications are often modeled using more than one variable
and more than one equation. A system of equations consists of a set of
two or more equations with the same variables. In this part, we will study
linear systems, which contain two linear equations each with two variables.
For example,
2x − 3y = 0
(
−4x − 2y = 8
A solution to a linear system, or simultaneous solution, is an ordered
pair (x, y) that solves both of the equations. In this case, (3, 2) is the only
solution. To check that an ordered pair is a solution, substitute the corre-
sponding x and y values into each equation and then simplify to see if you
obtain a true statement for both equations.
2x + y − z = 1
x − 3y + t = 0
y + z − 7t = 0
11
2.2. Definitions 2
This is a linear system with three equations and two unknowns, and it is a
homogeneous system.
Remark 2.2.1. All homogeneous linear system have at least one solution,
which is the zero solution
Resolution by substitution
a first method is substitution. For example for the system:
3x + 2y = 1
(
2x − 7y = −2
y = 21 − 32 x
(
2x − 7( 12 − 23 x) = −2
The second equation is now an expression that contains only x, and we
can solve it
y = 21 − 32 x y = 25
( (
8
⇔
2x − 7( 12 − 23 x) = −2 x = 25
3
12
2.2. Definitions 2
x − y = −4
(
,
2x + y = 1
Write the equivalent system and graph the lines on the same set of axes form
x − y = −4 y =x+4
( (
⇐⇒
2x + y = 1 y = 1 − 2x
Use the graph to estimate the point where the lines intersect and check to
see if it solves the original system. In the above graph, the point of intersec-
tion appears to be (−1, 3).
13
2.2. Definitions 2
Where
x1 b1
x2 b2
A = (aij )1≤i≤n,1≤j≤m , X = =
. ,B
.
.
.
xn bm
We note that the number of lines of the matrix A is equal to the number
of equations, while the number of columns of the matrix A is equal to the
number of unknowns in the linear system.
Example 2.2.6. Let be the following linear system
2x + y − z = 1
x − 3y + t = 0
y + z − 7t = 0
This linear system can be written in the following matrix form, i.e
x
2 1 −1 0 1
y
1 −3 0
AX + B ⇔ 1 = 0
z
0 1 1 −7 0
t
Remark 2.2.2. We note that the first column is the coefficients of the first
unknown, while the coefficients of the second column are the coefficients of
the second unknown, the third column is the coefficients of the third unknown,
and the last column is the coefficients of the last unknown.
14
2.2. Definitions 2
···
an1 x1 + an2 x2 + · · · + ann xn = bn
a11 a12 · · ·
a1n x1 b1
a21 a22 · · · a2n
x2
b2
A= .. .. .. ∈ Mn (K), X= .. et B= .. .
. . . . .
an1 an2 · · · ann xn bn
AX = B
15
2.2. Definitions 2
x1 + 2x3 = 6
−3x1 + 4x2 + 6x3 = 30
−x1 − 2x2 + 3x3 = 8
We have
1 0 2 6
A = −3
4 6
B = 30
−1 −2 3 8
6 0 2 1 6 2 1 0 6
A1 = 30 4 6 , A2 = −3 30 6 , A3 = −3 4 30
8 −2 3 −1 8 3 −1 −2 8
and
det A = 44, det A1 = −40, det A2 = 72, det A3 = 152.
Then, the solution is
det A1 40 10 det A2 72 18 det A3 152 38
x1 = =− =− x2 = = = x3 = = = .
det A 44 11 det A 44 11 det A 44 11
Remark 2.2.3. The Cramer method is not the most effective method for
solving a system, but is useful if the system contains parameters.
[A | b]−→
transformation [A | b ] ,
′ ′
16
2.2. Definitions 2
equivalently,
(1)
∗ If a11 = 0, we are looking for a row L(1)
p with 2 ≤ p ≤ n such that
(1) (1)
ap1 ̸= 0, then, we permute the rows L1 and L(1) p , and we apply
(1)
the transformations similar to the case a11 ̸= 0, which is studied
above. In this step, all coefficients under the diagonal of the first
column are equal 0.
Step k:
(k)
∗ If akk ̸= 0, we make the following changes:
(k+1) (k)
L(1) = L1
17
2.2. Definitions 2
(k+1) (k)
L(2) = L2
..
.
(k+1) (k)
Lk = Lk
(k)
(k+1) (k) aik (k)
Li = Li − (k) · Lk i = k + 1, n
akk
(k+1) (k)
aij
= aij i = 1, k, j = 1, n
with (k+1) (k)
(k)
aik (k)
aij = aij − (k) akj i = k + 1, n, j = 1, n
akk
(k+1) (k)
bi
= bi , i = 1, k
and (k+1) (k)
(k)
aik (k)
bi = bi − (k) · bk , i = k + 1, n
akk
(k) (k)
∗ If akk = 0, we permute the rows Lk and Lp(k) where L(k) p is a
(k)
line with index p with k + 1 ≤ p ≤ n, such that apk ̸= 0, and
we apply transformations analogous to those corresponding to the
(k)
case akk ̸= 0 which is studied above.
k=1
18
2.2. Definitions 2
0 0 · · · a′nn | b′n
Then, AX = b ⇔ A(1) X = b(1) ⇔ A(2) X = b(2) ⇔ . . . ⇔ A(n) X = b(n) ⇔
A ′ X = b′
−1 2 3 −1 4 → L4
We have a11 = 1 ̸= 0, then,
−a21 −2
ℓ21 = = = −2
a11 1
−a31 −3
ℓ31 = = = −3
a11 1
−a41 1
ℓ41 = = =1
a11 1
19
2.2. Definitions 2
L′2 = ℓ21 · L1 + L2 ⇔ L′2 = −2 1 1 0 3 4 + 2 1 −1 1 | 1
= 0 −1 −1 −5 | −7
L′3 = ℓ31 ·L1 +L3 ⇔ L′3 = −3 1 1 0 3 4 + 3 −1 −1 2 −3
= 0 −4 −1 −7 | −15
L′4 = ℓ41 · L1 + L4 ⇔ L′4 = 1 1 1 0 3 4 + −1 2 3 −1 | 4
= 0 3 3 2 |8
1 1 0 3 4 → L′1 = L1
0 −1 −1 −5 −7 → L′
2
0 −4 −1 7 −15 → L′
3
0 3 3 2 8 → L′4
We have a22 = −1 ̸= 0, then,
(2)
−a32 4
ℓ32 = (2)
= = −4
a22 −1
(2)
−a42 −3
ℓ42 = (2)
= =3
a22 −1
L′′3 = ℓ32 ·L′2 +L′3 ⇔ L′′3 = −4 0 −1 −1 −5 −7 + 0 −4 −1 −7 | −15
= 0 0 3 13 | 13
L′′4 = ℓ42 ·L′2 +L′4 ⇔ L′′4 = 3 0 −1 −1 −7 −15 + 0 3 3 2 8
= 0 0 0 −13 − 13
20
2.2. Definitions 2
1 1 0 3 4 → L′1 = L1
0 −1 −1 −5 −7
→ L′′2 = L′2
0 0 3 13 13 → L′′3
0 0 0 −13 | −13 → L′′4
1 1 0 3 4 x1 + x2 + 3x4 = 4
x1
0 −1 −1 −5 −x2 − x3 − 5x4 = −7
x2 −7
= ⇐⇒
0 0 3 13 x3 13 3x3 + 13x4 = 13
0 0 0 −13 −13x4 = −13
x4 −13
(4) =⇒ x4 = −13
−13
=1
(3) =⇒ 3x3 = 13 − 13x4 = 0 =⇒ x3 = 0
(2) =⇒ x2 = −x3 − 5x4 + 7 =⇒ x2 = 2
(1) =⇒ x1 = 4 − x2 − 3x4 = −1
The solution is :
−1
2
X=
k0
1
4
det{A} = (−1)p det{A′ } = (−1)P a′kk = (−1)0 (1)(−1)(3)(−13) = 39
Y
k=1
Definition 2.2.1. Let A ∈ Mn×m (R), we have the rank defined as follows:
rank(A) ≤ min(n, m)
21
2.2. Definitions 2
There are several ways to know the rank of a matrix, the most important
of which are:
We are interessting in the third way because we can apply the Gauss elimi-
nation method.
Now, we have the following system in the matrix form:
AX = B
x + 2y − z = 1
Example 2.2.9. We have the following system: 2x − 3z = 3 (S)
−x − 2y + z = 1
We write the system in the matrix form:
1 2 −1 1
x
2
(S) ⇔ AX = B ⇔ 0 y = 3
3
−1 −2 1 z 1
22
2.2. Definitions 2
Next,
1 2 −1 1
(A | B) = 2 0 3 3
−1 −2 1 1
We do some changes, we get:
1 2 −1 1 1 2 −1 1
(A | B) = 2 0 3 3 ∼ 0 −2 5 1
−1 −2 1 1 0 0 0 2
We remark that rank(A) ̸= rank(A | B).
1 2 −1 1 x + 2y − z = 1
(A | B) ∼ 0 −2 5 1 ⇔ (S ′ ) −2y + 5z = 1
0 0 0 2 0=2
23
2.2. Definitions 2
x + 2y − z = 1 x + 2y − z = 1 x= 4 = 2
6 3
Finally, we have: (S) −4y + 5z = 1 ⇔ −4y + 5z = 1 ⇔ y = − 14
z=n
3 o
2z = 0
z=0
Therefore, the set of solutions is: 3
2
, − 14 , 0
x + 3y − z + t = 1
2x − 4y + z − t = 0
x − y + 4z + t = 1
24