Chapitre 4
4- Matrices
Lecture : 26 minQuiz de 16 questions
# 4- Matrices
## Operations with matrices
### Introduction
Welcome to this lesson on operations with matrices! Matrices are powerful mathematical tools used in various fields, from computer graphics to engineering. In this lesson, you will learn how to perform fundamental operations with matrices, including addition, subtraction, scalar multiplication, and matrix multiplication. Understanding these operations is crucial for solving more complex problems involving systems of equations and transformations.
### Key Concepts
#### Addition of Matrices
To add two matrices, they must have the **same order** (i.e., the same number of rows and columns). You add corresponding elements from each matrix to get the element in the resulting matrix.
* **Condition:** Matrices must be of the same order.
* **Rule:** Add the elements in the corresponding positions.
If \[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \] and \[ B = \begin{pmatrix} e & f \\ g & h \end{pmatrix} \], then
\[ A + B = \begin{pmatrix} a+e & b+f \\ c+g & d+h \end{pmatrix} \]
#### Subtraction of Matrices
Similar to addition, to subtract two matrices, they must also have the **same order**. You subtract corresponding elements from the second matrix from the first matrix.
* **Condition:** Matrices must be of the same order.
* **Rule:** Subtract the elements in the corresponding positions.
If \[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \] and \[ B = \begin{pmatrix} e & f \\ g & h \end{pmatrix} \], then
\[ A - B = \begin{pmatrix} a-e & b-f \\ c-g & d-h \end{pmatrix} \]
#### Scalar Multiplication
Scalar multiplication involves multiplying a matrix by a single number (a scalar). Every element within the matrix is multiplied by that scalar.
* **Rule:** Multiply each element of the matrix by the scalar.
If \[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \] and \( k \) is a scalar, then
\[ kA = k\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} ka & kb \\ kc & kd \end{pmatrix} \]
#### Matrix Multiplication
Matrix multiplication is more complex than the other operations. It has a specific condition for when it can be performed and a unique rule for how the elements are calculated.
* **Condition:** For two matrices, \( A \) and \( B \), to be multiplied to form \( AB \), the number of columns in matrix \( A \) must be equal to the number of rows in matrix \( B \).
* If matrix \( A \) has order \( m \times n \) and matrix \( B \) has order \( n \times p \), then the resulting matrix \( AB \) will have an order of \( m \times p \).
* **Rule:** To find an element in the product matrix, you multiply the elements of a row from the first matrix by the corresponding elements of a column from the second matrix and sum the products.
If \[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \] and \[ B = \begin{pmatrix} e & f \\ g & h \end{pmatrix} \], then
\[ AB = \begin{pmatrix} (a \times e) + (b \times g) & (a \times f) + (b \times h) \\ (c \times e) + (d \times g) & (c \times f) + (d \times h) \end{pmatrix} \]
Important Note: Matrix multiplication is generally **not commutative**, meaning \( AB \neq BA \). The order of multiplication matters.
#### Identity Matrix
An identity matrix, denoted by \( I \), is a square matrix (number of rows equals number of columns) where all the elements on the main diagonal are 1s and all other elements are 0s. When an identity matrix is multiplied by any other matrix \( A \) (of compatible order), the result is \( A \) itself.
* For a 2x2 matrix, \[ I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \]
* Property: \( IA = AI = A \)
#### Zero Matrix (Null Matrix)
A zero matrix, denoted by \( 0 \), is a matrix where all its elements are zero. Adding a zero matrix to any matrix \( A \) results in \( A \).
* For a 2x2 matrix, \[ 0 = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \]
* Property: \( A + 0 = A \)
### Vocabulary
* **Matrix (plural: matrices):** A rectangular array of numbers, symbols, or expressions, arranged in rows and columns.
* **Order/Dimension:** The size of a matrix, specified by the number of rows \( m \) and columns \( n \) (written as \( m \times n \)).
* **Element:** An individual entry in a matrix.
* **Scalar:** A single number that multiplies a matrix.
* **Identity Matrix:** A square matrix with ones on the main diagonal and zeros elsewhere, acting like the number '1' in multiplication.
* **Zero Matrix (Null Matrix):** A matrix in which every element is zero, acting like the number '0' in addition.
### Examples
Let \[ A = \begin{pmatrix} 2 & 1 \\ 3 & 4
\end{pmatrix} \] and \[ B = \begin{pmatrix} 5 & 6 \\ 0 & 2
\end{pmatrix} \]
1. **Addition:**
\[ A + B = \begin{pmatrix} 2+5 & 1+6 \\ 3+0 & 4+2 \end{pmatrix} = \begin{pmatrix} 7 & 7 \\ 3 & 6 \end{pmatrix} \]
2. **Subtraction:**
\[ A - B = \begin{pmatrix} 2-5 & 1-6 \\ 3-0 & 4-2 \end{pmatrix} = \begin{pmatrix} -3 & -5 \\ 3 & 2 \end{pmatrix} \]
3. **Scalar Multiplication (Let \( k = 3 \)):**
\[ 3A = 3\begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix} = \begin{pmatrix} 3 \times 2 & 3 \times 1 \\ 3 \times 3 & 3 \times 4 \end{pmatrix} = \begin{pmatrix} 6 & 3 \\ 9 & 12 \end{pmatrix} \]
4. **Matrix Multiplication:**
\[ AB = \begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 0 & 2 \end{pmatrix} \]
\[ AB = \begin{pmatrix} (2 \times 5) + (1 \times 0) & (2 \times 6) + (1 \times 2) \\ (3 \times 5) + (4 \times 0) & (3 \times 6) + (4 \times 2) \end{pmatrix} \]
\[ AB = \begin{pmatrix} 10 + 0 & 12 + 2 \\ 15 + 0 & 18 + 8 \end{pmatrix} = \begin{pmatrix} 10 & 14 \\ 15 & 26 \end{pmatrix} \]
### Exercises
Given the matrices: \[ P = \begin{pmatrix} 4 & -1 \\ 2 & 3 \end{pmatrix} \], \[ Q = \begin{pmatrix} 0 & 5 \\ -2 & 1 \end{pmatrix} \], and \[ R = \begin{pmatrix} 1 & 0 & 2 \\ 3 & 4 & 5 \end{pmatrix} \]
Calculate the following, if possible:
1. \( P + Q \)
2. \( Q - P \)
3. \( 2P \)
4. \( PQ \)
5. \( QR \)
6. \( P^2 \) (which means \( P \times P \))
### Assignment
For the following questions, show all your working clearly.
1. If \[ A = \begin{pmatrix} -3 & 2 \\ 0 & 4 \end{pmatrix} \] and \[ B = \begin{pmatrix} 1 & -5 \\ 6 & 2 \end{pmatrix} \], find:
a) \( A + B \)
b) \( 2B - A \)
c) \( AB \)
2. Given \[ M = \begin{pmatrix} 1 & 2 \\ -1 & 3 \end{pmatrix} \] and \[ N = \begin{pmatrix} 0 & 4 \\ 5 & -2 \end{pmatrix} \], determine if \( MN = NM \).
3. A shop sells two types of shirts, formal and casual, in three sizes: Small, Medium, Large. The number of shirts sold in January and February are represented by the matrices below:
January Sales (J): \[ J = \begin{pmatrix} 10 & 15 & 20 \\ 8 & 12 & 18 \end{pmatrix} \] (Rows: Formal, Casual; Columns: S, M, L)
February Sales (F): \[ F = \begin{pmatrix} 12 & 10 & 22 \\ 10 & 15 & 16 \end{pmatrix} \]
a) Calculate the total sales for both months, \( J + F \).
b) If the price for a formal shirt is $50 and a casual shirt is $30, represent this as a row matrix \( P = \begin{pmatrix} 50 & 30 \end{pmatrix} \). Calculate \( P(J+F) \) to find the total revenue from each size of shirt for the two months combined.
### Summary
In this lesson, we explored the fundamental operations with matrices. We learned that:
* **Addition and Subtraction** require matrices to have the same order, performed by adding or subtracting corresponding elements.
* **Scalar Multiplication** involves multiplying every element in a matrix by a single number.
* **Matrix Multiplication** requires the number of columns in the first matrix to equal the number of rows in the second matrix. It involves multiplying rows by columns and summing the products, and it is generally not commutative.
* The **Identity Matrix** \( I \) acts like '1' in multiplication (\( IA = A \)), and the **Zero Matrix** \( 0 \) acts like '0' in addition (\( A+0 = A \)).
These operations are vital for understanding and applying matrices in various mathematical and real-world contexts.
## The Determinant, Adjugate of a matrix and the Inverse of a matrix
### Introduction
Welcome to this lesson on advanced matrix operations! Matrices are powerful tools used in various fields like engineering, computer graphics, and economics to represent and manipulate data. In this lesson, we will explore three crucial concepts: the **determinant**, the **adjugate (or adjoint)**, and the **inverse** of a matrix. These concepts are fundamental for understanding how to "undo" matrix transformations, solve systems of linear equations, and analyze the properties of matrices.
### Key Concepts
#### What is a Determinant?
The determinant is a special scalar value that can be computed from the elements of a square matrix. It provides important information about the matrix, such as whether the matrix has an inverse and if the system of equations it represents has a unique solution.
##### Determinant of a 2x2 Matrix
For a 2x2 matrix \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \), the determinant is calculated as:
\[ \det(A) = |A| = ad - bc \]
##### Determinant of a 3x3 Matrix
For a 3x3 matrix \( A = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} \), the determinant can be calculated using the method of cofactor expansion along any row or column. For example, expanding along the first row:
\[ \det(A) = a \det \begin{pmatrix} e & f \\ h & i \end{pmatrix} - b \det \begin{pmatrix} d & f \\ g & i \end{pmatrix} + c \det \begin{pmatrix} d & e \\ g & h \end{pmatrix} \]
\[ \det(A) = a(ei - fh) - b(di - fg) + c(dh - eg) \]
#### Minors and Cofactors
To understand the adjugate and inverse of larger matrices, we first need to define minors and cofactors.
##### Minor (\( M_{ij} \))
The minor \( M_{ij} \) of an element \( a_{ij} \) in a matrix is the determinant of the submatrix formed by deleting the \( i^{th} \) row and \( j^{th} \) column.
##### Cofactor (\( C_{ij} \))
The cofactor \( C_{ij} \) of an element \( a_{ij} \) is related to its minor by the formula:
\[ C_{ij} = (-1)^{i+j} M_{ij} \]
The term \( (-1)^{i+j} \) determines the sign of the cofactor. This creates a pattern of alternating signs:
\( \begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix} \) for a 3x3 matrix.
#### Adjugate (Adjoint) of a Matrix
The adjugate of a square matrix A, denoted as \( \text{adj}(A) \), is the transpose of its cofactor matrix.
**Steps to find the Adjugate:**
1. Find the minor of each element in the matrix. \( M_{ij} \)
2. Calculate the cofactor of each element. \( C_{ij} = (-1)^{i+j} M_{ij} \)
3. Form the cofactor matrix \( C \) where each element is its cofactor. \( C = (C_{ij}) \)
4. Transpose the cofactor matrix to get the adjugate matrix. \( \text{adj}(A) = C^T \)
#### Inverse of a Matrix
The inverse of a square matrix A, denoted as \( A^{-1} \), is a matrix such that when multiplied by A, it yields the Identity Matrix (\( I \)). The Identity Matrix is a square matrix with ones on the main diagonal and zeros elsewhere, for example, \( I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \) for a 2x2 matrix.
**Condition for Existence:**
A matrix \( A \) has an inverse if and only if its determinant is non-zero (i.e., \( \det(A) \neq 0 \)). Such a matrix is called a **non-singular** matrix. If \( \det(A) = 0 \), the matrix is **singular** and does not have an inverse.
**Formula for the Inverse:**
The inverse of a matrix \( A \) is given by:
\[ A^{-1} = \frac{1}{\det(A)} \text{adj}(A) \]
##### Inverse of a 2x2 Matrix
For a 2x2 matrix \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \), the inverse can be found directly:
\[ A^{-1} = \frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \]
### Vocabulary
* **Matrix**: A rectangular array of numbers, symbols, or expressions, arranged in rows and columns.
* **Square Matrix**: A matrix with an equal number of rows and columns.
* **Determinant**: A scalar value calculated from the elements of a square matrix.
* **Minor (\( M_{ij} \))**: The determinant of the submatrix formed by deleting the \( i^{th} \) row and \( j^{th} \) column.
* **Cofactor (\( C_{ij} \))**: The minor with a sign determined by its position: \( C_{ij} = (-1)^{i+j} M_{ij} \).
* **Cofactor Matrix**: A matrix where each element \( a_{ij} \) is replaced by its cofactor \( C_{ij} \).
* **Adjugate Matrix (Adjoint Matrix)**: The transpose of the cofactor matrix, denoted as \( \text{adj}(A) \).
* **Inverse Matrix (\( A^{-1} \))**: A matrix that, when multiplied by the original matrix \( A \), results in the identity matrix (\( I \)).
* **Identity Matrix (\( I \))**: A square matrix with ones on the main diagonal and zeros elsewhere.
* **Singular Matrix**: A square matrix whose determinant is zero (\( \det(A) = 0 \)). It does not have an inverse.
* **Non-singular Matrix**: A square matrix whose determinant is non-zero (\( \det(A) \neq 0 \)). It has an inverse.
### Examples
#### Example 1: Determinant of a 2x2 Matrix
Find the determinant of \( A = \begin{pmatrix} 3 & 4 \\ 1 & 2 \end{pmatrix} \).
**Solution:**
\[ \det(A) = (3)(2) - (4)(1) = 6 - 4 = 2 \]
#### Example 2: Determinant of a 3x3 Matrix
Find the determinant of \( B = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 1 \\ 5 & 2 & 2 \end{pmatrix} \).
**Solution (expanding along the first row):**
\[ \det(B) = 1 \det \begin{pmatrix} 4 & 1 \\ 2 & 2 \end{pmatrix} - 2 \det \begin{pmatrix} 0 & 1 \\ 5 & 2 \end{pmatrix} + 3 \det \begin{pmatrix} 0 & 4 \\ 5 & 2 \end{pmatrix} \]
\[ \det(B) = 1((4)(2) - (1)(2)) - 2((0)(2) - (1)(5)) + 3((0)(2) - (4)(5)) \]
\[ \det(B) = 1(8 - 2) - 2(0 - 5) + 3(0 - 20) \]
\[ \det(B) = 1(6) - 2(-5) + 3(-20) \]
\[ \det(B) = 6 + 10 - 60 \]
\[ \det(B) = -44 \]
#### Example 3: Adjugate and Inverse of a 2x2 Matrix
Find the adjugate and inverse of \( A = \begin{pmatrix} 3 & 4 \\ 1 & 2 \end{pmatrix} \).
**Solution:**
First, find the determinant: \( \det(A) = (3)(2) - (4)(1) = 6 - 4 = 2 \). Since \( \det(A) \neq 0 \), the inverse exists.
Using the formula for the 2x2 inverse:
\[ A^{-1} = \frac{1}{2} \begin{pmatrix} 2 & -4 \\ -1 & 3 \end{pmatrix} = \begin{pmatrix} 1 & -2 \\ -\frac{1}{2} & \frac{3}{2} \end{pmatrix} \]
The adjugate is simply the matrix \( \begin{pmatrix} 2 & -4 \\ -1 & 3 \end{pmatrix} \) before multiplying by \( \frac{1}{\det(A)} \).
#### Example 4: Adjugate and Inverse of a 3x3 Matrix
Find the adjugate and inverse of \( B = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 2 & 1 \\ 1 & 1 & 0 \end{pmatrix} \).
**Solution:**
**Step 1: Find the Determinant.**
Expand along the first row:
\[ \det(B) = 1 \det \begin{pmatrix} 2 & 1 \\ 1 & 0 \end{pmatrix} - 0 \det \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} + 1 \det \begin{pmatrix} 0 & 2 \\ 1 & 1 \end{pmatrix} \]
\[ \det(B) = 1((2)(0) - (1)(1)) - 0 + 1((0)(1) - (2)(1)) \]
\[ \det(B) = 1(-1) + 1(-2) = -1 - 2 = -3 \]
Since \( \det(B) = -3 \neq 0 \), the inverse exists.
**Step 2: Find all Minors.**
\( M_{11} = \det \begin{pmatrix} 2 & 1 \\ 1 & 0 \end{pmatrix} = -1 \)
\( M_{12} = \det \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = -1 \)
\( M_{13} = \det \begin{pmatrix} 0 & 2 \\ 1 & 1 \end{pmatrix} = -2 \)
\( M_{21} = \det \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = -1 \)
\( M_{22} = \det \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} = -1 \)
\( M_{23} = \det \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} = 1 \)
\( M_{31} = \det \begin{pmatrix} 0 & 1 \\ 2 & 1 \end{pmatrix} = -2 \)
\( M_{32} = \det \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} = 1 \)
\( M_{33} = \det \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} = 2 \)
**Step 3: Find all Cofactors.**
\( C_{11} = (-1)^{1+1} M_{11} = 1(-1) = -1 \)
\( C_{12} = (-1)^{1+2} M_{12} = -1(-1) = 1 \)
\( C_{13} = (-1)^{1+3} M_{13} = 1(-2) = -2 \)
\( C_{21} = (-1)^{2+1} M_{21} = -1(-1) = 1 \)
\( C_{22} = (-1)^{2+2} M_{22} = 1(-1) = -1 \)
\( C_{23} = (-1)^{2+3} M_{23} = -1(1) = -1 \)
\( C_{31} = (-1)^{3+1} M_{31} = 1(-2) = -2 \)
\( C_{32} = (-1)^{3+2} M_{32} = -1(1) = -1 \)
\( C_{33} = (-1)^{3+3} M_{33} = 1(2) = 2 \)
**Step 4: Form the Cofactor Matrix.**
\[ C = \begin{pmatrix} -1 & 1 & -2 \\ 1 & -1 & -1 \\ -2 & -1 & 2 \end{pmatrix} \]
**Step 5: Find the Adjugate Matrix (Transpose of Cofactor Matrix).**
\[ \text{adj}(B) = C^T = \begin{pmatrix} -1 & 1 & -2 \\ 1 & -1 & -1 \\ -2 & -1 & 2 \end{pmatrix}^T = \begin{pmatrix} -1 & 1 & -2 \\ 1 & -1 & -1 \\ -2 & -1 & 2 \end{pmatrix} \]
*(Note: In this specific case, the cofactor matrix happened to be symmetric, so its transpose is itself.)*
**Step 6: Find the Inverse Matrix.**
\[ B^{-1} = \frac{1}{\det(B)} \text{adj}(B) = \frac{1}{-3} \begin{pmatrix} -1 & 1 & -2 \\ 1 & -1 & -1 \\ -2 & -1 & 2 \end{pmatrix} \]
\[ B^{-1} = \begin{pmatrix} \frac{1}{3} & -\frac{1}{3} & \frac{2}{3} \\ -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \\ \frac{2}{3} & \frac{1}{3} & -\frac{2}{3} \end{pmatrix} \]
### Exercises
1. Find the determinant of the following matrices:
a) \( A = \begin{pmatrix} 5 & 2 \\ -3 & 4 \end{pmatrix} \)
b) \( B = \begin{pmatrix} -1 & 0 \\ 7 & 6 \end{pmatrix} \)
c) \( C = \begin{pmatrix} 2 & 1 & 0 \\ 3 & -1 & 4 \\ 1 & 0 & 2 \end{pmatrix} \)
2. For the matrix \( D = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix} \):
a) Find the minor \( M_{23} \).
b) Find the cofactor \( C_{23} \).
c) Find the minor \( M_{31} \).
d) Find the cofactor \( C_{31} \).
3. Find the adjugate of the matrix \( E = \begin{pmatrix} 2 & -3 \\ 4 & 1 \end{pmatrix} \).
4. Determine if the following matrices are singular or non-singular. If non-singular, find their inverse.
a) \( F = \begin{pmatrix} 6 & 9 \\ 2 & 3 \end{pmatrix} \)
b) \( G = \begin{pmatrix} 5 & 1 \\ 2 & 3 \end{pmatrix} \)
5. Find the inverse of \( H = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ 1 & 0 & 3 \end{pmatrix} \).
### Assignment
1. Given the matrix \( A = \begin{pmatrix} x & 3 \\ 2 & x-1 \end{pmatrix} \), find the value(s) of \( x \) for which \( A \) is a singular matrix.
2. If \( P = \begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix} \) and \( Q = \begin{pmatrix} 3 & -1 \\ 2 & 4 \end{pmatrix} \), find:
a) \( P^{-1} \)
b) \( Q^{-1} \)
c) \( (PQ)^{-1} \) and verify that \( (PQ)^{-1} = Q^{-1}P^{-1} \).
3. A linear transformation is given by the matrix \( T = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix} \). Find the inverse transformation matrix \( T^{-1} \).
4. Consider the matrix \( M = \begin{pmatrix} 1 & -1 & 0 \\ 2 & 1 & -2 \\ 0 & 3 & 1 \end{pmatrix} \).
a) Calculate \( \det(M) \).
b) Find the adjugate of \( M \).
c) Find \( M^{-1} \).
### Summary
In this lesson, we have covered the essential concepts of the determinant, adjugate, and inverse of matrices. The determinant, a single scalar value, tells us crucial information about a square matrix, including whether its inverse exists. We learned how to calculate determinants for 2x2 and 3x3 matrices. The adjugate matrix, formed by transposing the matrix of cofactors, is a key component in finding the inverse. Finally, we derived the formula for the inverse of a matrix: \( A^{-1} = \frac{1}{\det(A)} \text{adj}(A) \), emphasizing that an inverse only exists for non-singular matrices (where \( \det(A) \neq 0 \)). These operations are fundamental for solving systems of linear equations and understanding linear transformations.
## Solving simultaneous linear equations using matrices.
### Introduction
Welcome to this lesson on using matrices to solve simultaneous linear equations! You have previously learned methods like substitution and elimination to solve systems of equations. In this lesson, we will explore a powerful and systematic method using matrices. This technique is especially useful for solving larger systems of equations and forms the basis for many applications in science and engineering.
### Key Concepts
#### 1. Representing Simultaneous Equations in Matrix Form
Any system of two linear equations with two variables can be written in a compact matrix form. Consider a general system of two linear equations:
\( ax + by = e \)
\( cx + dy = f \)
This system can be represented as a matrix equation in the form \( AX = B \), where:
* **A** is the **coefficient matrix**, containing the coefficients of the variables.
\[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \]
* **X** is the **variable matrix** (or column vector), containing the variables.
\[ X = \begin{pmatrix} x \\ y \end{pmatrix} \]
* **B** is the **constant matrix** (or column vector), containing the constants on the right side of the equations.
\[ B = \begin{pmatrix} e \\ f \end{pmatrix} \]
So, the matrix equation looks like:
\[ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} e \\ f \end{pmatrix} \]
**Example:**
Write the system \( 2x + 3y = 7 \) and \( 4x - y = 5 \) in matrix form.
**Solution:**
\[ \begin{pmatrix} 2 & 3 \\ 4 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 7 \\ 5 \end{pmatrix} \]
#### 2. The Inverse of a Matrix
To solve the matrix equation \( AX = B \), we need to use the inverse of the coefficient matrix \( A \). Remember that for a square matrix \( A \), its inverse, denoted \( A^{-1} \), is a matrix such that when multiplied by \( A \), it yields the **identity matrix** \( I \).
\( A A^{-1} = A^{-1} A = I \)
For a 2x2 matrix \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \), its inverse is given by:
\[ A^{-1} = \frac{1}{\text{det}(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \]
where \( \text{det}(A) \) is the **determinant** of matrix \( A \), calculated as:
\( \text{det}(A) = ad - bc \)
**Important Note:** A matrix only has an inverse if its determinant is **not zero**. If \( \text{det}(A) = 0 \), the matrix is called a **singular matrix**, and the system of equations will either have no solution or infinitely many solutions.
#### 3. Solving the Matrix Equation \( AX = B \)
Once we have the matrix equation \( AX = B \) and we know how to find \( A^{-1} \), we can solve for \( X \) as follows:
1. Start with the equation: \( AX = B \)
2. Multiply both sides by \( A^{-1} \) from the **left**:
\( A^{-1} (AX) = A^{-1} B \)
3. Since \( A^{-1} A = I \) (the identity matrix):
\( IX = A^{-1} B \)
4. And since multiplying by the identity matrix leaves the variable matrix unchanged (
\( IX = X \)):
\( X = A^{-1} B \)
By performing the matrix multiplication \( A^{-1} B \), you will obtain a column matrix \( X \) that contains the values of your variables (e.g., \( x \) and \( y \)).
### Vocabulary
* **Matrix:** A rectangular array of numbers, symbols, or expressions arranged in rows and columns.
* **Coefficient Matrix (A):** The matrix formed by the numerical coefficients of the variables in a system of linear equations.
* **Variable Matrix (X):** A column matrix containing the variables (e.g., \( \begin{pmatrix} x \\ y \end{pmatrix} \)).
* **Constant Matrix (B):** A column matrix containing the constants on the right-hand side of the linear equations.
* **Determinant:** A scalar value that can be computed from the elements of a square matrix. It is denoted as \( \text{det}(A) \) or \( |A| \).
* **Inverse Matrix (\( A^{-1} \)):** For a square matrix \( A \), its inverse is a matrix such that their product is the identity matrix (\( A A^{-1} = I \)).
* **Identity Matrix (I):** A square matrix with ones on the main diagonal and zeros everywhere else (e.g., \( \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \) for a 2x2 matrix).
* **Singular Matrix:** A square matrix whose determinant is zero, meaning it does not have an inverse.
### Examples
Let's solve the following system of equations using the matrix method:
1. \( 3x + 2y = 12 \)
2. \( x - y = 1 \)
**Step 1: Write the system in matrix form \( AX = B \)**
\( A = \begin{pmatrix} 3 & 2 \\ 1 & -1 \end{pmatrix} \), \( X = \begin{pmatrix} x \\ y \end{pmatrix} \), \( B = \begin{pmatrix} 12 \\ 1 \end{pmatrix} \)
So, \( \begin{pmatrix} 3 & 2 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 12 \\ 1 \end{pmatrix} \)
**Step 2: Find the determinant of matrix A**
\( \text{det}(A) = (3)(-1) - (2)(1) \)
\( \text{det}(A) = -3 - 2 \)
\( \text{det}(A) = -5 \)
Since \( \text{det}(A) \neq 0 \), the inverse exists.
**Step 3: Find the inverse of matrix A (\( A^{-1} \))**
\( A^{-1} = \frac{1}{\text{det}(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \)
\( A^{-1} = \frac{1}{-5} \begin{pmatrix} -1 & -2 \\ -1 & 3 \end{pmatrix} \)
\( A^{-1} = \begin{pmatrix} \frac{-1}{-5} & \frac{-2}{-5} \\ \frac{-1}{-5} & \frac{3}{-5} \end{pmatrix} = \begin{pmatrix} \frac{1}{5} & \frac{2}{5} \\ \frac{1}{5} & -\frac{3}{5} \end{pmatrix} \)
**Step 4: Calculate \( X = A^{-1} B \)**
\( \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \frac{1}{5} & \frac{2}{5} \\ \frac{1}{5} & -\frac{3}{5} \end{pmatrix} \begin{pmatrix} 12 \\ 1 \end{pmatrix} \)
\( \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} (\frac{1}{5})(12) + (\frac{2}{5})(1) \\ (\frac{1}{5})(12) + (-\frac{3}{5})(1) \end{pmatrix} \)
\( \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \frac{12}{5} + \frac{2}{5} \\ \frac{12}{5} - \frac{3}{5} \end{pmatrix} \)
\( \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \frac{14}{5} \\ \frac{9}{5} \end{pmatrix} \)
**Step 5: State the values of \( x \) and \( y \)**
Therefore, \( x = \frac{14}{5} \) (or \( 2.8 \)) and \( y = \frac{9}{5} \) (or \( 1.8 \)).
**Step 6: Verify the solution (optional but recommended)**
Substitute \( x = 2.8 \) and \( y = 1.8 \) into the original equations:
1. \( 3(2.8) + 2(1.8) = 8.4 + 3.6 = 12 \) (Correct!)
2. \( 2.8 - 1.8 = 1 \) (Correct!)
### Exercises
Solve the following systems of linear equations using the matrix method:
1. \( 2x + 5y = 11 \)
\( x + 2y = 4 \)
2. \( 4x - 3y = 18 \)
\( x + 2y = -1 \)
3. \( 3m + 4n = 10 \)
\( 2m - n = 3 \)
### Assignment
Solve the following problems using the matrix method. Show all your steps clearly.
1. \( x + 3y = 7 \)
\( -2x + y = 0 \)
2. \( 5p - q = 13 \)
\( 2p + 3q = 12 \)
3. The sum of two numbers is 15. Twice the first number minus the second number is 3. Find the two numbers. (Hint: First, form the two linear equations, then solve them using matrices).
### Summary
In this lesson, we learned how to solve simultaneous linear equations using matrices. The key steps are:
1. **Formulate the matrix equation:** Convert the system of equations into the form \( AX = B \).
2. **Find the determinant of A:** Calculate \( \text{det}(A) = ad - bc \). Remember, if \( \text{det}(A) = 0 \), there is no unique solution.
3. **Find the inverse of A:** Calculate \( A^{-1} = \frac{1}{\text{det}(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \).
4. **Solve for X:** Calculate \( X = A^{-1} B \) to find the values of the variables.
This method provides an organized and efficient way to solve systems of linear equations and is a fundamental concept in higher mathematics and various scientific fields.
Quiz du chapitre
16 questions — vérifie chaque réponse pour voir l'explication.