Education

Matrix Method of Solving Linear Equations

Linear equations are algebraic equations whose degree of each variable is 1. Graphically, linear equations represent straight lines in a plane. To solve a system of linear equations, we have a number of methods.  

We can solve them algebraically, use matrices and may use iterative methods. In this article, we shall discuss a matrix method – Cramers rule to find the solution to the given system of linear equations. 

A system of linear equations 

a11x1 + a12x2 + … + a1nxn = b1

a21x1 + a22x2 + … + a2nxn = b2

am1x1 + am2x2 + … + amnxn = bm

can be represented in matrix form as AX = B, where

This system of linear equations can be easily solved using Cramer’s Rule.

Cramer’s Rule

This rule is named after the mathematician Gabriel Cramer (1704–1752). In this method, the system of linear equations is solved by taking the determinants of the matrices. Let AX = B represent a system of linear equations, where A is the (m × n) coefficient matrix, X is the (n × 1) column matrix of unknowns, and B is the (m × 1) column matrix of constants. 

To get the solution by this rule, we first have to find the determinants D, Dx1, Dx2, …, Dxn where 

D = |A|; determinant of matrix A,

[latex]D=\begin{vmatrix}a_{11} &a_{12} & … & a_{1n} \\a_{21} &a_{22} & … & a_{2n} \\ …&… &… & … \\a_{m1} &a_{m2} & … & a_{mn} \\\end{vmatrix}[/latex]

Dx1 = The determinant of matrix A whose 1st column is replaced by the column matrix B,

[latex]Dx_{1}=\begin{vmatrix}b_{1} &a_{12} & … & a_{1n} \\b_{2} &a_{22} & … & a_{2n} \\ …&… &… & … \\b_{m} &a_{m2} & … & a_{mn} \\\end{vmatrix}[/latex]

Dx2 = The determinant of matrix A whose 2nd column is replaced by the column matrix B,

[latex]Dx_{2}=\begin{vmatrix}a_{11} &b_{1} & … & a_{1n} \\a_{21} &b_{2} & … & a_{2n} \\ …&… &… & … \\a_{m1} &b_{m} & … & a_{mn} \\\end{vmatrix}[/latex]

Dxn = The determinant of matrix A whose nth column is replaced by the column matrix B.

[latex]Dx_{n}=\begin{vmatrix}a_{11} &a_{12} & … & b_{1} \\a_{21} &a_{22} & … & b_{2} \\ …&… &… & … \\a_{m1} &a_{m2} & … & b_{m} \\\end{vmatrix}[/latex]

Then, x1 = Dx1/D, x2 = Dx2/D, …, xn = Dxn/D

Also, refer to Cramer’s Rule in detail. 

Important Points to Remember

  • Cramer’s Rule is applicable only if D ≠ 0; that is, the coefficient of matrix A should not be a singular matrix.
  • If D ≠ 0, the system of equations AX = B has a unique solution.
  • If D = 0, then the given linear equation system either has no solution or infinitely many solutions.

Steps to Apply Cramer’s Rule

Let us understand how to apply Cramer’s rule with an example. Consider the system of linear equations: 5x + 7y = – 2 and 4x + 6y = – 3

Step 1: Express in a matrix form of AX = B

Thus, 

[latex]A=\begin{bmatrix}5 & 7 \\4 & 6 \\\end{bmatrix}, \:\;X=\begin{bmatrix}x \\y\end{bmatrix}\:\;and\:\;B=\begin{bmatrix}-2 \\-3\end{bmatrix} [/latex]

Step 2:  Now, we shall find the determinants.

Find the subtraction of a12a21 from a11a22 to get the value of D.

[latex]D=|A|=\begin{vmatrix}5 & 7 \\4 & 6 \\\end{vmatrix}= 5\times 6 – 4 \times 7=30-28=2[/latex]

Find the subtraction of a12b2 from a22b1 by replacing column 1 of A with B to get the value of Dx.

[latex]Dx=\begin{vmatrix}-2 & 7 \\-3 & 6 \\\end{vmatrix}= -2\times 6 – (-3) \times 7=-12+21=9[/latex]

Finally, find the subtraction of a12b2 from a22b1 by replacing column 2 of A with B to get the value of Dy.

[latex]Dy=\begin{vmatrix}5 & -2 \\4 & -3 \\\end{vmatrix}= 5\times (-3) – (-2) \times 4=-15+8=-7[/latex]

Step 3: Find the value of unknowns.

Now x = Dx/D = 9/2 and y = Dy/D = –7/2

Thus, the solution of the given system of linear equations by Cramer’s Rule is x = 9/2 and y = –7/2.

This rule is efficient in finding solutions for systems of linear equations of two or three variables. For more number of variables, this method becomes quite tedious.  

Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *