Solving System of Linear Equations
A system of linear equations consists of multiple linear equations with the same set of variables. One efficient way to solve these systems is by using matrices. Matrices help in organizing the system of equations and applying matrix operations to find the solution. The most common methods for solving systems of linear equations using matrices include matrix inverse method and Cramer's rule.
1. Matrix Representation of Linear Equations
A system of linear equations can be written in the form:
[ a_1x + b_1y + c_1z = d_1 \ a_2x + b_2y + c_2z = d_2 \ a_3x + b_3y + c_3z = d_3 ]
This system can be represented as a matrix equation: [ AX = B ]
Where:
-
A
is the coefficient matrix, -
X
is the column matrix of variables, -
B
is the column matrix of constants.
For example, the above system is represented as:
[ \begin{bmatrix} a_1 & b_1 & c_1 \ a_2 & b_2 & c_2 \ a_3 & b_3 & c_3 \end{bmatrix} \begin{bmatrix} x \ y \ z \end{bmatrix}
\begin{bmatrix} d_1 \ d_2 \ d_3 \end{bmatrix} ]
Methods to Solve Systems of Linear Equations
-
Matrix Inverse Method: If the matrix
A
is invertible, we can find the solution by multiplying both sides of the equation byA^{-1}
(the inverse of matrixA
): [ X = A^{-1}B ] -
Cramer's Rule: This method uses determinants to find the values of the variables. It's particularly useful when dealing with smaller systems, as it involves calculating the determinant of the coefficient matrix.
Example 1: Solving using the Matrix Inverse Method
Consider the system of equations:
[ 2x + 3y = 5 \ 4x + y = 6 ]
Step 1: Write the system in matrix form
We represent the system in the form AX = B
:
[ \begin{bmatrix} 2 & 3 \ 4 & 1 \end{bmatrix} \begin{bmatrix} x \ y \end{bmatrix}
\begin{bmatrix} 5 \ 6 \end{bmatrix} ]
Here, the coefficient matrix A
is:
[
A = \begin{bmatrix}
2 & 3 \
4 & 1
\end{bmatrix}
]
The constants matrix B
is:
[
B = \begin{bmatrix}
5 \
6
\end{bmatrix}
]
Step 2: Find the inverse of matrix A
To find the inverse of a 2x2 matrix A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}
, the formula is:
[
A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \ -c & a \end{bmatrix}
]
For our matrix: [ A^{-1} = \frac{1}{(2 \times 1 - 4 \times 3)} \begin{bmatrix} 1 & -3 \ -4 & 2 \end{bmatrix} = \frac{1}{-10} \begin{bmatrix} 1 & -3 \ -4 & 2 \end{bmatrix} = \begin{bmatrix} -0.1 & 0.3 \ 0.4 & -0.2 \end{bmatrix} ]
Step 3: Multiply the inverse of A by B
Now we multiply A^{-1}
by B
:
[ X = A^{-1}B = \begin{bmatrix} -0.1 & 0.3 \ 0.4 & -0.2 \end{bmatrix} \begin{bmatrix} 5 \ 6 \end{bmatrix} ] [ X = \begin{bmatrix} (-0.1 \times 5) + (0.3 \times 6) \ (0.4 \times 5) + (-0.2 \times 6) \end{bmatrix} = \begin{bmatrix} -0.5 + 1.8 \ 2.0 - 1.2 \end{bmatrix} = \begin{bmatrix} 1.3 \ 0.8 \end{bmatrix} ]
Thus, the solution is ( x = 1.3 ) and ( y = 0.8 ).
Example 2: Solving using Cramer's Rule
Consider the system of equations:
[ x + y + z = 6 \ 2x - y + 3z = 14 \ x + 4y - z = 2 ]
Step 1: Write the system in matrix form
We represent the system in the form AX = B
:
[ \begin{bmatrix} 1 & 1 & 1 \ 2 & -1 & 3 \ 1 & 4 & -1 \end{bmatrix} \begin{bmatrix} x \ y \ z \end{bmatrix}
\begin{bmatrix} 6 \ 14 \ 2 \end{bmatrix} ]
Step 2: Apply Cramer's Rule
Cramer's Rule states that for each variable (x_i), the value is:
[
x_i = \frac{\text{det}(A_i)}{\text{det}(A)}
]
Where A_i
is the matrix formed by replacing the i-th
column of A
with the constants matrix B
.
Step 2.1: Calculate det(A)
[ A = \begin{bmatrix} 1 & 1 & 1 \ 2 & -1 & 3 \ 1 & 4 & -1 \end{bmatrix} ]
The determinant of A
is calculated as:
[
\text{det}(A) = 1 \times \begin{vmatrix} -1 & 3 \ 4 & -1 \end{vmatrix} - 1 \times \begin{vmatrix} 2 & 3 \ 1 & -1 \end{vmatrix} + 1 \times \begin{vmatrix} 2 & -1 \ 1 & 4 \end{vmatrix}
]
[
= 1 \times ((-1 \times -1) - (4 \times 3)) - 1 \times ((2 \times -1) - (1 \times 3)) + 1 \times ((2 \times 4) - (1 \times -1))
]
[
= 1 \times (1 - 12) - 1 \times (-2 - 3) + 1 \times (8 + 1) = -11 + 5 + 9 = 3
]
Step 2.2: Calculate det(A_x), det(A_y), det(A_z)
- Replace the first column with
B
to getA_x
and calculatedet(A_x)
. - Replace the second column with
B
to getA_y
and calculatedet(A_y)
. - Replace the third column with
B
to getA_z
and calculatedet(A_z)
.
(For brevity, you can perform these determinant calculations similarly.)
Step 3: Solve for x, y, and z
After calculating the determinants, use Cramer's Rule to find the values of x
, y
, and z
.
Conclusion
By using matrices, solving systems of linear equations becomes more structured and efficient, especially for larger systems. Whether using the matrix inverse method or Cramer's rule, matrices provide a powerful way to organize and solve these equations in a concise manner.