0% ont trouvé ce document utile (0 vote)
22 vues3 pages

Multiplication des Matrices en Algèbre

Transféré par

abdelwahabbouchibane
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
22 vues3 pages

Multiplication des Matrices en Algèbre

Transféré par

abdelwahabbouchibane
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

Algèbre Les Matrices

1 La multiplication des matrices


1.1 Le critère de multiplication
Soient deux matrices A ∈ Mn×m (R) et B ∈ Mn′ ×m′ (R). Le produit AB est défini si et seule-
ment si m = n′ . Dans ce cas, le produit est une matrice C ∈ Mn×m′ (R).

Exemple :
   
1 2 5
×
3 4 2×2 6 2×1
Dans cet exemple, le produit est possible et donne une matrice de dimension 2 × 1.

1.2 Les propriétés de la multiplication matricielle


1.2.1 Non-commutativité
La multiplication des matrices n’est pas commutative en général :

A × B ̸= B × A

1.2.2 Distributivité

A × (B + C) = A × B + A × C et (B + C) × A = B × A + C × A

1.2.3 Associativité

A × (B × C) = (A × B) × C

1.2.4 Multiplication par la matrice identité


Soit In la matrice identité de taille n × n. Alors :

A × In = A et In × A = A

1.3 Formule générale de la multiplication


Soit C = A × B une matrice n × m′ , alors chaque élément cij de C est donné par :
m
X
cij = aik · bkj pour 1 ≤ i ≤ n, 1 ≤ j ≤ m′
k=1

1
Algèbre Les Matrices

   
a11 a12 · · · a1m b11 b12 ··· b1m′
 a21 a22 · · · a2m   b21 b22 ··· b2m′ 
..  ×  .. ..  =
   
 .. .. . . .. ..
 . . . .   . . . . 
an1 an2 · · · anm bm1 bm2 · · · bmm′
 
a11 b11 + a12 b21 + · · · + a1m bm1 ··· a11 b1m′ + a12 b2m′ + · · · + a1m bmm′
 a21 b11 + a22 b21 + · · · + a2m bm1 ··· a21 b1m′ + a22 b2m′ + · · · + a2m bmm′ 
 
 .. ... .. 
 . . 
an1 b11 + an2 b21 + · · · + anm bm1 ··· an1 b1m′ + an2 b2m′ + · · · + anm bmm′

Exemple :
       
1 2 5 1×5+2×6 17
× = =
3 4 2×2 6 2×1 3×5+4×6 39
 
  1    
1 2 3 4   1 · 1 + 2 · 0 + 3 · (−1) + 4 · 2 6
5 6 7 8   0  =  5 · 1 + 6 · 0 + 7 · (−1) + 8 · 2  = 14
−1
9 10 11 12 9 · 1 + 10 · 0 + 11 · (−1) + 12 · 2 22
2

1.4 L’algortihme de multiplication mattricielle

Algorithm 1 Algorithme de multiplication matricielle


1: Entrée : matrices A de taille n × m et B de taille m × p
2: Sortie : matrice C de taille n × p telle que C = A × B
3: for i = 1 to n do
4: for j = 1 to p do
5: C[i][j] ← 0
6: for k = 1 to m do
7: C[i][j] ← C[i][j] + A[i][k] × B[k][j]
8: end for
9: end for
10: end for
11: return C

2
Algèbre Les Matrices

1.5 Code C : Multiplication de matrices


1 # include < stdio .h >
2
3 # define N 3
4 # define M 2
5 # define P 4
6
7 int main () {
8 int A [ N ][ M ] = {
9 {1 , 2} ,
10 {3 , 4} ,
11 {5 , 6}
12 };
13
14 int B [ M ][ P ] = {
15 {7 , 8 , 9 , 10} ,
16 {11 , 12 , 13 , 14}
17 };
18
19 int C [ N ][ P ] = {0};
20
21 for ( int i = 0; i < N ; i ++) {
22 for ( int j = 0; j < P ; j ++) {
23 for ( int k = 0; k < M ; k ++) {
24 C [ i ][ j ] += A [ i ][ k ] * B [ k ][ j ];
25 }
26 }
27 }
28

29
30
31 for ( int i = 0; i < N ; i ++) {
32 for ( int j = 0; j < P ; j ++) {
33 printf ( " % d ␣ " , C [ i ][ j ]);
34 }
35 printf ( " \ n " );
36 }
37
38 return 0;
39 }

Listing 1 – Multiplication de deux matrices en C

Auteur : Etu Bouchibane Med Abdelwahab 3

Vous aimerez peut-être aussi