Professional Documents
Culture Documents
SEG : S4
Pr: Tazi Ennouri
1
Contents
1 Matrix calculation 4
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Dies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Particular square matrices . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 Diagonal Matrix . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.2 Null matrix and unit matrix . . . . . . . . . . . . . . . . . 5
1.3.3 Basic operations on matrices . . . . . . . . . . . . . . . . 5
1.3.4 Triangular matrix . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Elementary operations on matrices . . . . . . . . . . . . . . . . . 6
1.4.1 Equality of two matrices . . . . . . . . . . . . . . . . . . . 6
1.4.2 Addition and subtraction of matrices . . . . . . . . . . . . 6
1.4.3 Product of a matrix by a real . . . . . . . . . . . . . . . . 7
1.4.4 Product of two matrices . . . . . . . . . . . . . . . . . . . 8
1.5 Transpose of a matrix . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6 Symmetric matrix and antisymmetric matrix . . . . . . . . . . . 9
1.6.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.7 Symmetric matrix and antisymmetric matrix . . . . . . . . . . . 10
1.8 Trace of a square matrix . . . . . . . . . . . . . . . . . . . . . . . 11
1.8.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.8.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.9 Determinant of a square matrix . . . . . . . . . . . . . . . . . . . 12
1.9.1 Determinant of a square matrix of order 2 . . . . . . . . . 12
1.9.2 Determinant of a square matrix of order 3 by the method
of Sarrus . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.9.3 Determinant of a square matrix of order n > 2 by the
method of cofactors . . . . . . . . . . . . . . . . . . . . . 14
1.9.4 Determinant of a square matrix of order n > 2 by the
method of cofactors . . . . . . . . . . . . . . . . . . . . . 14
1.9.5 Properties of determinants . . . . . . . . . . . . . . . . . 16
1.10 The comatrix of a matrix . . . . . . . . . . . . . . . . . . . . . . 18
1.11 Inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.12 Inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.12.1 Definition and examples . . . . . . . . . . . . . . . . . . . 18
1.12.2 Some Properties of the Inverse . . . . . . . . . . . . . . . 19
1.13 Rank of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.13.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.13.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.13.3 Elementary transformations that do not change the rank
of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.13.4 Rang Properties . . . . . . . . . . . . . . . . . . . . . . . 21
1.14 The normal form of a matrix . . . . . . . . . . . . . . . . . . . . 22
2
1.14.1 Definition and Examples . . . . . . . . . . . . . . . . . . . 22
1.14.2 Technique for finding the normal form of a matrix . . . . 22
3 Vector space 37
3.1 Definition of a vector space . . . . . . . . . . . . . . . . . . . . . 37
3.2 Linear combinations . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 Free family, Linked family, Generating family . . . . . . . . . . . 40
3.3.1 Generating family . . . . . . . . . . . . . . . . . . . . . . 40
3.3.2 Free family, Linked family . . . . . . . . . . . . . . . . . . 41
3.4 Basis of a vector space . . . . . . . . . . . . . . . . . . . . . . . . 41
3.5 Linear Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.5.1 Kernel and image of a linear map . . . . . . . . . . . . . . 43
3
1 Matrix calculation
1.1 Introduction
In many economic analyses, the different variables are related to each other
by linear equations. Linear algebra provides a clear and precise notation for
formulating and solving such problems. In this chapter, we will first define the
notion of matrix. We will then look at the different types of matrices and the
usual operations such as arithmetic, the calculation of the determinant or the
inverse.
1.2 Dies
1.2.1 Definition
Definition 1. A matrix can be thought of as a rectangular array of numbers,
which has rows and n columns.
a1,1 a1,2 ··· a1,j
a2,1 a2,2 ··· a2,j
A = (ai,j ) = .
.. .. ..
.. . . .
ai,1 ai,2 ··· ai,j
1.2.2 Examples
Example 1.1. The following matrix A is square of order 3
4 0 −2
A = 17 −9 2
34 1 −6
4
1.3 Particular square matrices
1.3.1 Diagonal Matrix
Definition 3. We call the diagonal of a square matrix the set of its coefficients
whose row index is equal to the column index.
Example 1.3. A a square matrix of order 3
2 7 5
A = 3 0 6
1 4 1
5
Example 1.6. A an upper triangular matrix of order 3.
7 5 1
A = 0 2 3
0 0 4
6
• The null matrix 0, is the neutral element for the addition: A+0 = 0+A =
A
• If A + B = 0 then B = −A is called matrix opposite of A, If A = (aij )
then B = (−aij )
1+6 −1 + −(5) 6+1 (−5) + (−1)
A+B = = =B+A
3+2 0+1 2+3 1+0
7 −6
A+B =B+A=
5 1
Example 1.9. Consider the following matrices A, B and C:
1 −1 6 −5 0 2
A= B= et C =
3 0 2 1 2 4
7 −6 0 2 7 −4
(A + B) + C = + =
5 1 2 4 7 5
1 −1 6 −3 7 −4
A + (B + C) = + =
3 0 4 5 7 5
7
• (λ.µ)A = λ(µA) = µ(λA)
• The matrix A multiplied by the scalar 1 is equal to the matrix A.
• The matrix A multiplied by the scalar 0 is equal to the zero matrix.
• The null matrix multiplied by the scalar λ is equal to the null matrix.
We say that the coefficient Cij is obtained by multiplying the ith row of A by
the jth column of B.
Example 1.11. Let A and B be the following matrices:
1 2
1 3 0
A= et B = 0 2
−1 1 2
0 −1
1×1+3×0+0×0 1 × 2 + 3 × 2 + 0 × −1
A·B =
−1 × 1 + 1 × 0 + 2 × 0 −1 × 2 + 1 × 2 + 2 × −1
1 8
A×B =
−1 −2
Definition 14. If A, B and C are three matrices whose product and sum are
defined, we have:
1. (AB)C = A(BC) (associativity)
8
Example 1.12. Let A, B and C be three matrices of order 2.
1 −1 6 −5 0 2
A= ,B = et C =
3 0 2 1 2 4
4 −6 0 2 −12 −16
(A.B) · C = · =
18 −15 2 4 −30 −24
1 −1 −10 −8 −12 −16
A. (B.C) = · =
3 0 2 8 −30 −24
Note 2. .
• The multiplication of two matrices is not commutative.
• The division of two matrices does not exist, but we will see that the
multiplication by the inverse of a matrix has similarities with the division
in R.
1.6.1 Properties
Proposal 1. If A and B are two matrices whose sum and product are defined,
then we have the following relations:
• t (A + B) = t A + t B
• t (A · B) = t B · t A
• t t
( A) = A
9
Example 1.14. Let A and B be two matrices of order 2.
1 −1 6 −5
A= and B =
30 2 1
t 1 3 t 6 2
A= and B =
−1 0 −5 1
So
t t 7 5 t t 18 4
A+ B = and B · A =
−6 1 −15 −6
7 −6 t 7 5
A+B = ⇒ (A + B) =
5 1 −6 1
4 −6 t 4 18
A·B = ⇒ A·B =
18 −15 −6 −15
• A + (t A) is a symmetric matrix
• A − (t A) is an antisymmetric matrix
10
Example 1.16. Consider the following square matrix:
1 3 2
A = 0 1 −1
2 5 4
1 3 2 1 0 2 2 3 4
A + t A = 0 1 −1 + 3 1 5 = 3 2 4
2 5 4 2 −1 4 4 4 8
1 3 2 1 0 2 0 3 0
A − t A = 0 1 −1 − 3 1 5 = −3 0 −6
2 5 4 2 −1 4 0 6 0
1.8.2 Properties
Proposal 2. • tr (t A) = tr(A).
• If A and B are two square matrices of the same order, then we have:
tr(A + B) = tr(A) + tr(B).
11
Example 1.19. Given the following two matrices A and B, verify that
Example 1.20. Consider the matrix A of order (2,3) and the matrix B of order
(3,2) as follows:
0 −1
2 1 −1
A= B= 1 0
1 2 0
1 1
a11 a12
|A| = = a11 a22 − a21 a12
a21 a22
12
1.9.2 Determinant of a square matrix of order 3 by the method of
Sarrus
Definition 19. Either
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
a square matrix of order 3 Sarrus’ rule is to write the three columns of the
matrix A and repeat in order:
• Consider the first two rows below the A matrix to obtain the following
inline augmented matrix:
a11 a12 a13
& %
a21 a22 a23
& &
% %
AL = a31 a32 a33
& &
% %
a11 a12 a13
% &
a21 a22 a23
It is then enough to carry out the products of the coefficients of each diagonal
and to make the sum if the diagonal is descending (black arrow) or the difference
if the diagonal is ascending (red arrow).
|A| = a11 a22 a33 + a21 a32 a13 + a31 a12 a23 − a21 a12 a33 − a11 a32 a23 − a31 a22 a13
• Consider the first two columns to the right of the matrix A to obtain the
augmented matrix in the following column:
a11 a12 a13 a11 a12
& & &
% % %
AC = 21 a a22 a23 a 21 a 22
& & &
% % %
a31 a32 a33 a31 a32
and perform the products of the coefficients of each diagonal and make the sum
if the diagonal is descending (black arrow) or the difference if the diagonal is
ascending (red arrow).
|A| = a11 a22 a33 + a12 a23 a31 + a13 a21 a32 − a33 a21 a12 − a32 a23 a11 − a31 a22 a13
13
Note 5. WARNING: Sarrus’ method only works for square matrices of order 3
Example 1.22. Calculate the determinant of the matrix
2 −3 1
A= 3 2 −3
5 4 −2
Solution :
2 −3 1
& %
3
2 −3
& &
% %
AL =
5 4 −2
& &
% %
2
−3 1
% &
3 2 −3
|A| = 2∗2∗(−2)+3∗4∗1+5∗(−3)∗(−3)−3∗(−3)∗(−2)−2∗4∗(−3)−5∗2∗1) = −8+12+45−18+24−10 = 45
the same if we consider the matrix
2 −3 1 2 −3
& & &
% % %
AC = 3 2 −3 3 2
& & &
% % %
5 4 −2 5 4
14
2. The determinant of a submatrix Aij is called the minor of the item aij
3. The signature of an item aij is given by (−1)i+j .
4. The cofactor of an item aij is the minor care product by its signature, i.e.:
(−1)i+j |Aij | .
Example 1.23. Find the sub-matrix A23 , the minor of a12 and the cofactor of
a32 of the matrix:
5 2 −3
−6 4 7
8 −1 −4
Solution : The sub-matrix
5 2
A23 =
8 −1
−6 7
|A12 | = = 24 − 56 = −32
8 −4
The cofactor of the element a32 is the product of the minor of a32 and its
signature, that is:
5 −3
(−1)3+2 |A32 | = (−1)5 = −1(35 − 18) = −17
−6 7
− . . . (−1)1+j . . . (−1)1+n
+
− + . . . (−1)2+j . . . (−1)2+n
.. .. .. .. .. ..
. . . . . .
(−1)i+1 . . . . . . (−1)i+j . . . (−1)i+n
.. .. .. .. .. ..
. . . . . .
(−1)n+1 . . . . . . (−1)n+j . . . +
15
Theorem 1. If A is a square matrix of order n, then,
for all j, 1 ≤ j ≤ n.
Example 1.24. Calculate the determinant of the matrix:
3 −2 1
2 −3 4
5 −1 2
3 −2 1
−3 4 2 4 2 −3
2 −3 4 =3 +2 +1
−1 2 5 2 5 −1
5 −1 2
So
3 −2 1
2 −3 4 = 3(−6 + 4) + 2(4 − 20) + 1(−2 + 15) = −6 − 32 + 13 = −25
5 −1 2
3 −2 1
|A| = (−1)4+4 ∗ 9 2 −3 4 = 9 ∗ (−25) = −225
5 −1 2
16
2. If two rows or two columns of A are proportional then |A| = 0
7. Let A and B be two matrices which differ only in that the elements of a
row (or of a column) of the matrix B are obtained by multiplying by k the
elements with the same address of A. then
|A| = k|B|
a11 a12 a13 a11 a12 a13
ka21 ka22 ka23 =k a21 a22 a23
a31 a32 a33 a31 a32 a33
8. det(A) = det (t A)
9. det(A · B) = det(A) · det(B)
17
10. The determinant of a triangular matrix is equal to the product of the ele-
ments of the main diagonal.
11. The determinant of a diagonal matrix is equal to the product of the ele-
ments of the main diagonal.
Note 7. The determinant of an identity matrix (regardless of its order) is equal
to 1.
18
obtained by the following relation
1 t
A−1 = · Com(A)
|A|
19
1.13 Rank of a matrix
1.13.1 Definitions
Definition 24. (Submatrix) Let A be a matrix of order (m × n). We call sub-
matrix of A, a matrix which is obtained from the matrix A when we eliminate
one or more rows (or columns) of A.
Definition 25. (Rank of a matrix) Let A be a matrix of order (m × n) We call
rank of a matrix the order of the largest square sub-matrix whose determinant
is non-zero.
Note 9. .
• The rank of a matrix A is denoted rg(A)
• If A of order (m × n), then rg(A) ≤ min(m, n).
1.13.2 Examples
Example 1.28. If A is the following matrix of order (2 × 3); find its rank:
1 3 2
A=
1 3 1
thesquare sub-matrix
of order 2, composed of the second and the third column
3 2
A1 is invertible det (A1 ) = 3 − 6 = −3 6= 0. There therefore exists
3 1
at least one sub-matrix of order 2 whose determinant is different from zero.
Consequently rg(A) = 2
Example 1.29. Either
1 0 1
B= 0 5 −1
−1 0 −1
Note 10. .
• The rank of an invertible square matrix of order n is equal to n(rg(A) = n).
• If all the elements of a matrix are zero, the rank is said to be zero.
• If a matrix A of order (m × n) has a maximum rank rg (A) = min(m, n),
we say that the matrix has a complete rank.
20
1.13.3 Elementary transformations that do not change the rank of
a matrix
It is obvious that calculating the rank of a matrix can be a very long operation.
Let us take the case of a square matrix of order n. First we need to calculate
the determinant of the matrix itself. If the determinant is different from zero,
the rank is n but if it is equal to zero, it will be necessary to calculate the
determinant of the sub-matrices of order (n − 1). Now, there are n2 . If all
these sub-matrices have a null determinant, it is necessary to pass to the sub-
matrices of order (n − 2) and so on. It is for this reason that we are going
to see a method which facilitates the determination of the rank of a matrix.
This method is based on elementary transformations. There are three types of
elementary transformations:
1. Swapping two rows (columns),
Li ↔ Lj , (Ci ↔ Cj ) , ; (i 6= j)
3. The fact of adding to a line (column) the multiple of another line (column)
These elementary transformations do not change the rank of the matrix. Thus,
we will use these transformations to reduce a matrix A to its normal form.
21
1.14 The normal form of a matrix
1.14.1 Definition and Examples
Definition 26. If A is a matrix of order (m×n) its normal form is the following:
n n−r
p1 0 · · · 0q p0 · · · 0q
r 0 1 ··· 0 0 ··· 0
.. .. . . .. .. . . ..
. . . . . . .
= Ir 0
x0 0 · · · 1y x0 · · · 0y 0 0
p0 0 · · · 0q p0 · · · 0q
. . . .. . . ..
m − r .. .. . . . ..
. . .
x0 0 · · · 0y x0 · · · 0y
The rank of this matrix is r, because the largest invertible sub-matrix is of order
r.
2. To get a11 = 1
1
L1 = L1
a11
3. To have ai1 = 0, i 6= 1;
Li = Li − ai1 L1
22
4. To have a1j = 0, j 6= 1;
Cj ↔ Cj − a1j C1
We repeat points 1 to 4 for the element (2, 2). Point 1 is not necessary because
the element (2, 2) = 2 is non-zero.
1 0 0 0
1 1
L2 = L2 D = 0 1 2 1
2
0 −1 −5 −7
1 0 0 0
L3 ↔ L3 + L2 D = 0 1 21 1
0 0 −9 2 −6
1 0 0 0
1 1
C3 ↔ C3 − C2 C4 ↔ C4 − C2 D= 0 1 2 1
2
0 −1 −5 −7
23
Let’s apply point 2 to row 3, then point 4 to column 4
1 0 0 0
1
L3 = −9 L3 ⇒ D = 0 1 0 0
2 0 0 1 34
1 0 0 0
4
C4 = C4 − C3 ⇒ D = 0 1 0 0
3
0 0 1 0
So rg(A) = 3
2.2 Definitions
Definition 27. .
• A linear equation with unknown p is any equation of the form:
a1 x1 + a2 x2 + . . . . . . + ap xp = b
Definition 28. .
• We call a system of n linear equations with p unknown the tuple of equa-
tions:
24
a11 x1 + . . . + a1j xj + . . . + a1p xp , = b1
a21 x1 + . . . + a2j xj + . . . + a2p xp , = b2
...
(S)
ai1 x1 + . . . + aij xj + . . . + aip xp , = bi
..
.
a x + . . . + a x + . . . . + a x ,
n1 1 nj j np p = bn
• Solving the system (S) consists in finding the set of solutions of (S).
• A system with no solution is said to be impossible.
• A system with several solutions is said to be indeterminate.
Note 12. A homogeneous system always admits the zero solution (0, 0 . . . ., 0).
Definition 29. Two systems S and S ’ are equivalent if they have the same set
of solutions.
Note 13. You have to be careful to only do one basic operation at a time.
25
2.4 Matrix writing of a linear system
x1
x2
By introducing an unknown column array X = , we can write the
..
.
xp
system (S) as an equation between matrices:
AX = b
With
a11 a12 ... a1p b1
a21 a22 ... a2p b2
A= and b=
.. .. .. .. ..
. . . . .
an1 an2 ... anp bn
Note 14. .
• A is a matrix of order (n,p) called matrix of the system S
• X is a column-vector with p components called vector of unknowns
• best an n-component column-vector called the vector of constants.
Definition 31. (Rank of a linear system). We call the rank of a linear system,
that of its matrix.
Example 2.1. Write the following system of linear equations S1 in matrix form:
x1 − 2x2 + 3x3 = 16
2x1 + 2x2 − x3 = 0
S1
x1 + x2 + 5x3 = 11
x1 + x2 − 6x3 = −11
26
The vector of constants b is a vector with four components:
16
0
b= 11
−11
We finally have the following system:
1 −2 3 16
2 2 −1 x 1
· x2 = 0
1 1 5 11
x3
1 1 −6 −11
The rank of the system S1 is equal to three since the rank of its associated
matrix A is equal to three.
1 −2 3
Indeed the determinant of the submatrix 1 1 5 is different from
1 1 −6
0 . Performing the operation L3 = L3 − L2 , we obtain
1 −2 3 1 −2 3
1 −2
1 1 5 = 1 1 5 = −11(−1)3+3 = −11(1 +
1 1
1 1 −6 0 0 −11
2) = −33 6= 0
27
2. Calculate the determinant of the matrix Ai obtained by replacing the i th
column by the elements of the column vector of the second member b
3. These two preliminary operations make it possible to obtain the solutions
of the system S by setting
|Ai |
xi =
|A|
Example 2.2. Solve by CRAMER’s method the following system of equations:
2x1 − 3x2 + 5x3 , = −8
4x1 − 2x2 + x3 , = 12
x1 + 5x2 − x3 , = −3
The determinant being different from zero, the solution is unique is given by:
−8 −3 5 2 −8 5 2 −3 −8
12 −2 1 4 12 1 4 −2 12
−3 5 −1 1 −3 −1 1 5 −3
x1 = = 3 x2 = = −2 x3 = = −4
89 89 89
28
2. A multiple of the first line is subtracted from the ie line so that the coef-
ficient at x1 of the ie line is zero,
ai1
Li ↔ Li − L1 (2 ≤ i ≤ n)
a11
L1
The system (S) is transformed into the equivalent system Where
(S1 )
(S1 ) is a system of (n − 1) unknown (p − 1) equations: x2 , x3 , . . . ., xp
3. We apply the method described in 1. and
2. to (S1 ) which will in turn be
L2
transformed into an equivalent system Where (S2 ) is a system of
(S2 )
(n − 2) unknown (p − 2) equations : x3 , x4 , . . . ., xp
4. The process stops because at each step, the number of equations and the
number of unknowns decrease
5. We find at the end a triangular system, it is then enough to ”go up”:
Note 15. .
• Choice of pivots: at each step, if possible, it is in your interest to choose
a simple pivot ( 1 is often the best choice ).
• If during a step appears an equation of the form 0 = β
• Siβ 6= 0 the process stops because (S) is impossible.
• If β = 0 we can delete the equation (0 = 0) and continue the solution.
29
x1 + 2x2 + x3 = 1
(
a32 −4 2x2 + x3 =2
L3 = L3 −
a22 L2 = L3 − 2 L2 = L3 + 2L2
3x3 =6
whose solution is
x1 = 1 − 2x2 − x3 = −1
x2 = 21 (2 − x3 ) = 0
x3 = 2
S = {(−1, 0, 2)}
Example 2.4. Solve
x1 − x4 =0
x + 2x + x + 2x
1 2 3 4 =3
2x 1 + 2x 2 + 3x 3 =5
x1 − 2x2 + 2x3 + x4 =4
L2 = L2 − a21
= L2 − L1 x1 − x4 =0
a11 L1
2x2 + x3 + 3x4 =3
a31
L3 = L3 − a11 L1 = L3 − 2L1
a41 2x2 + 3x3 + 2x4 =5
L4 = L4 − a11 L1 = L4 − L1
−2x2 + 2x3 + 2x4 =4
− x4 = 0
x1
2x2 + x3 + 3x4 =3
S
1
2x2 + 3x3 + 2x4 =5
−2x2 + 2x3 + 2x4 =4
x1 − x4 = 0
L3 = L3 − aa2232
L2 = L3 − 22 L2 = L3 − L2
L4 = L4 − aa42 L2 = L4 − −2 2
L2 = L4 + L2
22
x1 − x4 = 0 2x2 + x3 + 3x4 =3
L3 = L3 − aa32
22
L2 = L 3 − 2
2 L2 = L3 − L2 2x3 − x4 =2
L4 = L4 − aa42 L = L − 2
L = L + L 3x 3 + 5x4 =7
22
2 4 −2 2 4 2
x1 − x4 = 0
2x2 + x3 + 3x4 = 3
a43 3 2x2 + x4 = 2
L = L − L = L − L
4
4 a33 3 4 2 3 13
2 x4 =4
30
We get the following triangular system:
x1 − x4
=0
2x + x + 3x =3
2 3 4
2x3 − x4
=2
13
2 x4 =4
whose solution is
8
x1 = x4 = 13
1 1
x2 = 2 (3 − x3 − 3x4 ) = − 13
1 17
x3 = 2 (2 + x4 ) = 13
8
x4 = 13
8 1 17 8
So S = 13 , − 13 , 13 , 13
x = 1 − 2x2 − x3 = 1
1
1 1
x = − x3 = − λ λ∈R
2
2 2
x3 = λ
S = 1, − 21 λ, λ
with λ ∈ R
31
Example 2.6. Solve
2x1 + x2 − 3x3 + 4x4
=5
3x1 + 5x2 + 2x3 − 3x4 =8
−x1 + 3x2 + 8x3 − 11x4 = −7
−x1 + 3x2 + 8x3 − 11x4 = −7
L1 ↔ L3 3x1 + 5x2 + 2x3 − 3x4 =8
2x1 + x2 − 3x3 + 4x4 =5
a21
L2 = L2 − L1 = L2 + 3L1
a11
a31 −x1 + 3x2 + 8x3 − 11x4 = −7
L3 = L3 − L1 = L3 + 2L1 14x2 + 26x3 − 36x4 = −13
a11
7x2 + 13x3 − 18x4 = −9
−x 1 + 3x2 + 8x3 − 11x4 = −7
14x2 + 26x3 − 36x4 = −13
S1
7x2 + 13x3 − 18x4 = −9
−x1 + 3x2 + 8x3 − 11x4 = −7
a32 7 1 14x2 + 26x3 − 36x4 = −13
L3 = L3 − a22 L2 = L3 − 14 L2 = L3 − 2 L2
0 = 52
The last line is impossible, so the system has no solution.
We can easily associate the following matrix (known as the matrix augmented
by the second member):
a11 a12 . . . a1p b1
a21 a22 . . . a2p b2
[A | b] = .
.. .. .. ..
..
. . . .
an1 an2 ... anp bn
32
Here, the vertical bar only serves to separate the left parts from the right parts
of the equations (it only serves to facilitate reading). Solving the system S
amounts to scaling the augmented matrix [A | b] by performing the same kind
of Gaussian operations as on systems of equations.
Example 2.7. Solve the following system:
x + y + z
=1
(S) 3x + 2y + z =6
y−z =3
−3z = 6 ⇔ z = −2
−y − 2z = 3 ⇒ −y + 4 = 3 ⇒ y = 1
x+y+z =1⇒x+1−2=1⇒x=2
Note 16. .
1. Solving a system of equations by matrices or by directly manipulating
the equations is exactly the same. The only difference is that the ma-
trix method is much less time consuming to use since we don’t need to
transcribe the variables (in this example, x, y and z) at each step.
2. Solving a system of equations by matrix is more advantageous when solv-
ing several systems of equations which differ only by the second member.
33
Example 2.8. Solve the following systems:
x+y+z =1 x+y+z =4
(S1 ) 3x + 2y + z = 6 and (S2 ) 3x + 2y + z =5
y−z =3 y−z =9
We notice that the two systems differ only by their second members b1 and b2 ,
so they have the same associated matrix A that we will increase by the two
second members and make a resolution simultaneous.
1 1 1 1 4
[A | b1 , b2 ] = 3 2 1 6 5
0 1 −1 3 9
1 1 1 1 4
(L2 = L2 − 3L1 ) ⇒ [A | b] ∼ 0 −1 −2 3 −7
0 1 −1 3 9
1 1 1 1 4
(L3 = L3 + L2 ) ⇒ [A | b1 , b2 ] ∼ 0 −1 −2 3 −7
0 0 −3 6 2
So
x + y + z = 4
x+y+z =1
(S1 ) . ⇔) −y − 2z =3 and (S2 ) . ⇔ −y − 2z = −7
−3z =6
−3z =2
34
Example 2.10. What is the rank of the following matrix A:
0 0 1 3
1 0 −1 2
A= 0 0 1 2
−2 4 −4 1
−1 0 3 0
To find the rank of A, we will scale it using the Gauss method.
1 0 −1 2
0 0 1 3
L1 ↔ L2
0 0 1 2
−2 4 −4 1
−1 0 3 0
1 0 −1 2
L4 = L4 + 2L1 0 0 1 3
0 0 1 2
L5 = L5 + L1 0 4 −6 5
0 0 2 2
1 0 −1 2
0 4 −6 5
L2 ↔ L4
0 0 1 2
0 0 1 3
0 0 2 2
1 0 −1 2
L4 = L4 − L3 0 4 −6 5
0 0 1 2
L5 = L5 + 2L3 0 0 0 2
0 0 0 −2
1 0 −1 2
0 4 −6 5
L5 = L5 + L4 0 0 1 2
0 0 0 2
0 0 0 0
The number of nonzero rows of the echelon matrix is 4, so the rank of A is 4.
35
The Gaussian transformation consists in transforming this system into an equiv-
alent system whose left block is the identity, i.e. the matrix (A | I) must be
modified so that it becomes the form (I | B). Matrix B is none other than the
inverse matrix of A : A−1 .
Theorem 4. Let A be an invertible matrix of order n. By elementary row oper-
ations, A can be transformed into In . The sequence of operations that transform
A into In , transform In into A−1 .
Process to transform (A | I) into (I | B) using Gaussian method
1. Step 1: Transform the matrix A into an upper triangular matrix using
Gauss’s method. Check if the rank of A is equal to the order of the
matrix, that is to say that all the elements of the diagonal are non-zero:
• If yes, the matrix is invertible, go to step 2.
• Otherwise, the matrix is not invertible and the process is stopped.
2. Step 2: To get 1 on the diagonal, we set:
1
Li = Li
aii
3. Step 3: To have 0 for all the elements located above the diagonal, we set:
Li = Li − aij Lj , for 1 ≤ i ≤ (j − 1) and j = n, n − 1, . . . ..2
36
Example 2.12. Give the inverse of the following matrix:
2 1 1
B= 4 1 0
−2 2 1
We increase the matrix A by I3
2 1 1 1 0 0
4 1 0 0 1 0
−2 2 1 0 0 1
Let’s transform A into an upper triangular matrix
L2 = L2 − 2L1 2 1 1 1 0 0
0 −1 −2 −2 1 0
L3 = L3 + L1 0 3 2 1 0 1
2 1 1 1 0 0
L3 = L3 + 3L2 0 −1 −2 −2 1 0
0 0 −4 −5 3 1
It is noticed that the number of non-zero pivots is equal to 3, therefore the
matrix is invertible. Have 1 on the diagonal
1
L1 = L1 1 1 1
2 1 2 2 2 0 0
L2 = −L2 0 1 2 2 −1 0
5
1 0 0 1 4 − 43 − 41
L3 = − L3
4
Have 0 for all elements above the diagonal
1 1
− 18
1 0 0 |
1 8 8
L1 = L1 − L2 0 1 0 | − 12 1
2
1
2
2 5
0 0 1 | 4 − 43 − 14
1 12 0 − 18 3 1
1 8 8
L1 = L1 − L3 0 1 0 − 12 1
2
1
2
2 5
0 0 1 4 − 34 − 41
So
1 1
− 81
8 8
A−1 = − 12 1
2
1
2
5
4 − 43 − 14
3 Vector space
3.1 Definition of a vector space
Theorem 5. We call vector space on R all set E with tow operation satisfing:
37
1. an internal law addition, noted +, such that
+ : E × E −→ E
(u, v) 7−→ u + v
such as
• is commutative : ∀(uv) ∈ E 2 , u + v = v + u
• is associative : ∀(u, v, w) ∈ E 3 , (u + v) + w = u + (v + w)
• +admits a neutral element noted oE : ∀u ∈ E, u + oE = u
• ∀u ∈ E∃u0 ∈ E symmetrique de u such that
u + u0 = oE , u0 = −u
. : R × E −→ E
(λ, v) 7−→ λ.v
• α · u = OE ⇔ α = 0 or u = OE
38
• −u = (−1).u. we set u − v = u + (−v)
• (α − β) · u = α.u − β.u
Definition 33. Let (E, +,.)beaR.vector space and let F be a subset of E; If
(F, +,.) is itself a R vector space, we say that (F, +, .) is a sub-vector space of
E and denote F s.e.v of E.
Proposal 5. Let F be a part of a R vector space E. F is a vector subspace of
E if and only if
• F 6= ∅ (0E ∈ F )
• ∀(u, v) ∈ F 2 , (u + v) ∈ F
• ∀u ∈ F and ∀λ ∈ R, (λ.u) ∈ F
Example 3.2. F = {(x, x); x ∈ R} is s.e.v of R2 In effect
• 0R2 = (0, 0) ∈ F
• Let u and v be two elements of F, show that (u + v) ∈ F
u ∈ F → u = (x, x) x ∈ R
⇒ u+v = (x, x)+(y, y) = (x + y , x+y) ∈ F
v ∈ F → v = (y, y)y ∈ R | {z }
∈R
u = α1 u1 + · · · + αn un
39
Example 3.4. E = R2 : any vector (x, y) ∈ R2 is linear combination of vectors
(1, 0) and (0, 1)
Note 20. This theorem is often used in practice. To show that F is a vector
subspace of the vector space E, we show that F is the set of all linear combina-
tions of a finite number of vectors in E.
Example 3.5. E = (x, y, z) ∈ R3 /2x + y − z = 0 is a R vector space. Indeed
E ⊂ R3 which is a vector space over R and in addition we have .
∀u = (x, y, z) ∈ E ⇔ z = 2x + y
⇔ u = (x, y, 2x + y)
⇔ u = x(1, 0, 2) + y(0, 1, 1)
∀u ∈ E, ∃ {α1 , · · · , αn } ∈ Rn , u = α1 u1 + · · · + αn un
Note 21. The family {u1 , · · · , un } generates E if and only if E = vect ({u1 , · · · , un })
Example 3.6. 1. E = R, the family (1) is a generating family of E. indeed
∀x ∈ R, x = x.(1)
40
3.3.2 Free family, Linked family
Definition 35. The family {u1 , · · · , un } is said to be free or linearly indepen-
dent if it satisfies:
∀ (λ1 , . . . , λn ) ∈ Rn : λ1 u1 + . . . + λn un = 0 ⇒ λ1 = . . . = λn = 0
(λ1 u1 + λ2 u2 + λ3 u3 = 0E ) ⇒ (λ1 , λ2 , λ3 , 0) = 0E
λ1 = 0
(λ1 , λ2 , λ3 , 0) = 0E ⇒ λ2 = 0
λ3 = 0
41
Note 22. {u1 , · · · , un } is a basis of E if:
1. E = vect {u1 , · · · , un }
2. {u1 , · · · , un } is free
Example 3.9. Let E = Rn be a R. vector space. Let be the vectors e1 =
(1, 0, · · · , 0), e2 = (0, 1, · · · , 0), . . . .en = (0, 0, · · · , 1). The family {e1 , e2 , · · · , en }
is a basis of E called Canonical basis of Rn . and dim(E) = n
Theorem 10. Let E be a R.vector space; B = {u1 , · · · , un } a basis of E. Then
any vector of E can be written in a unique way as a linear combination of the
vectors u1 , · · · , un .
2. ∀u ∈ E, ∀λ ∈ R f (λu) = λf (u)
We denote by L(E, F ) the set of maps from E to F .
Note 23. We also say that f is a morphism of vector spaces.
Proposal 7. (Usual characterization of linear maps). A mapping f from E to
F is said to be linear if:
42
• f (−u) = −f (u), ∀u ∈ E
• f (0E ) = 0F
Example 3.10.
f :R→R
x 7→ ax (a ∈ R)
is a linear map. This is the simplest there is, it is called in analysis, linear
function Indeed, for all (x, y) ∈ R2 and (λ, µ) ∈ R2 , we
Example 3.11.
f: R2 → R3
(x, y) 7→ (x + y, x − y, 2y)
is a linear map. We have for all (x, y); (x0 , y 0 ) of R2 ,
f ((x, y) + (x0 , y 0 )) = f (x + x0 , y + y 0 )
0 0 0 0 0
= ((x + x ) + (y + y ) , (x + x ) − (y + y ) , 2 (y + y ))
= ((x + y) + (x0 + y 0 ) , (x − y) + (x0 − y 0 ) , 2y + 2y 0 )
= ((x + y), (x − y), 2y) + ((x0 + y 0 ) + (x0 − y 0 ) , 2y 0 )
= f (x, y) + f (x0 , y 0 ) .
43
Definition 41. Let E and F be two vector spaces and f : E → F a linear map.
We call
1. Kernel of f : the set {u ∈ E/f (u) = 0F } = f −1 ({0F }). We note it Ker(f ).
2. the range of f or Image of f : l the set {v ∈ F/∃u ∈ E such that v =
f (u)} = f (E).
We note it Im(f ).
Theorem 13. Let E and F be two vector spaces and f : E → F a linear map.
1. ker(f ) is a vector subspace of E.
Example 3.12. Let’s determine the kernel and the range of the linear map
f: R2 → R2
(x, y) 7→ (x + y, x + y).
Solution
Im(f ) = (a, b) ∈ R2 /∃(x, y) ∈ R2 such as (a, b) = (x + y, x + y)
(
a =x+y
(a, b) = (x + y, x + y) ⇔ (S)
b =x+y
44
Example 3.13. Let’s determine the kernel and the range of the linear map
f : R2 → R2
(x, y) 7→ (x + y, x − y).
Solution
Im(f ) = (a, b) ∈ R2 /∃(x, y) ∈ R2 such as (a, b) = (x + y, x − y)
(
a =x+y
(a, b) = (x + y, x − y) ⇔ (S)
b =x−y
a+b a−b
the solutions of the system (S) are x = 2 and y = 2 which exist for all
(a, b) ∈ R2
Im(f ) = R2
f is therefore surjective
ker(f ) = {(x, y)/f (x, y) = 0R2 = (0, 0)}
f : R3 → R2
(x, y, z) 7→ (x − y, y − z).
ker(f ) = {(x, y, z)/f (x, y, z) = 0R2 = (0, 0)}
References
45