matric.py

Created by hicham-choukour

Created on January 31, 2025

3.02 KB


"""
### I. Définitions
1. Matrice : Tableau de nombres réels organisé en n lignes et p colonnes.
2. Types de matrices :
   - Matrice colonne : p = 1
   - Matrice ligne : n = 1
   - Matrice carrée : n = p
   - Matrice nulle : Tous les coefficients sont 0.
3. Égalité de matrices : Deux matrices sont égales si elles ont le même format et les mêmes coefficients.
4. Matrice transposée : Inversion des lignes et colonnes d’une matrice.

Exemple :
Si A = [ [2, 4, -7], [-1, 0, 4] ],
alors sa matrice transposée est A^T = [ [2, -1], [4, 0], [-7, 4] ].

### II. Addition et soustraction de matrices
1. Définition : Additionner deux matrices de même format revient à additionner leurs coefficients position par position.
2. Propriétés :
   - Commutativité : A + B = B + A
   - Associativité : (A + B) + C = A + (B + C)
   - Élément neutre : A + 0 = A

Exemple :
[[2, 4, -7], [-1, 0, 4]] + [[-4, 0, -9], [2, -3, 13]] = [[-2, 4, -16], [1, -3, 17]]

### III. Multiplication d'une matrice par un réel
1. Définition : On multiplie chaque coefficient de la matrice par le réel.
2. Propriétés :
   - 0A = 0 et 1A = A
   - (α + β)A = αA + βA
   - α(A + B) = αA + αB
3. Opposée d’une matrice : -A = (-1)A.

Exemple :
Si A = [[2, 0], [-4, 6]], alors -2A = [[-4, 0], [8, -12]].

### IV. Multiplication de deux matrices
1. Définition : Produit d’une matrice A de format (n, p) par une matrice B de format (p, q).
2. Formule :
   (AB)_{ij} = somme( a_{ik} * b_{kj} pour k de 1 à p ).
3. Propriétés :
   - Non-commutativité : AB ≠ BA en général.
   - Associativité : (AB)C = A(BC).
   - Distributivité : A(B + C) = AB + AC.

Exemple :
[[1, -2, 3], [2, -4, 1]] * [[1, 0, 1, 2], [-1, 2, 3, 1], [3, -2, 0, 3]]

### V. Puissance d’une matrice carrée
1. Définition : A^n = A * A * ... * A (n fois).
2. Convention : A^0 = I_n (matrice identité).
3. Cas particulier des matrices diagonales :
   [[a, 0], [0, b]]^n = [[a^n, 0], [0, b^n]].

### VI. Inverse d’une matrice carrée
1. Définition : Une matrice A est inversible s’il existe A^{-1} tel que A * A^{-1} = A^{-1} * A = I_n.
2. Formule pour une matrice 2×2 :
   A^{-1} = (1 / (ad - bc)) * [[d, -b], [-c, a]] si ad - bc ≠ 0.

Exemple :
Si A = [[2, 3], [3, 4]], alors A^{-1} = (1 / (2*4 - 3*3)) * [[4, -3], [-3, 2]].

### VII. Écriture matricielle d’un système linéaire
1. Un système linéaire :
   3x + 2y = 0
   5x + 4y = 1
   s’écrit en matrice :
   [[3, 2], [5, 4]] * [[x], [y]] = [[0], [1]].
2. Méthode de résolution : Si A est inversible, alors X = A^{-1} * B.

### VIII. Exercices et applications
1. Calcul de matrices, additions, multiplications.
2. Recherche de matrices inverses.
3. Résolution de systèmes avec matrices inversibles.
4. Problèmes concrets :
   - Ventes d’une entreprise : Trouver combien d’articles à 30€ et 60€ ont été vendus.
   - Triathlon : Trouver la distance des parcours de natation, vélo et course.
   - Prédictions avec graphes probabilistes :
     - Évolution des abonnements à un théâtre.
     - Répartition des niveaux dans un club de cyclotourisme.

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.