Solving Linear Equations Using Matrix

In this article, we will explore two prominent methods for solving linear equations using matrices: the Matrix method and Row reduction (or Gaussian elimination). With the provided study notes, students should gain a better understanding of the topic and its related examples.

How to Solve Linear Equations using Matrix Method?

Let the equations be:

(\begin{array}{l}{{a}_1}x + {{a}_2}y + {{a}_3}z = {{d}_1}\\end{array})

\(\begin{array}{l}{{b}_{1}}x + {{b}_{2}}y + {{b}_{3}}z = {{d}_{2}}\end{array}\)

(\begin{array}{l}{{c}_{1}}x + {{c}_{2}}y + {{c}_{3}}z = {{d}_{3}}\end{array})

The steps to solving a system of equations using a matrix method are:

All the variables in the equations should be written in the correct order.

The variables should be written on the left side, the coefficients on the middle side, and the constants on the right side.

Solving a system of linear equations by the method of finding the inverse consists of creating two new matrices: one that is the inverse of the original matrix and one that is the result of multiplying the inverse matrix with the vector of constants.

Matrix A: which represents the variables

Matrix B: which represents the constants

A system of equations can be solved by employing matrix multiplication.

We write the above equations in matrix form as follows:

(\begin{array}{l}AX=B \Leftrightarrow \left[ \begin{matrix} {{a}_{1}} & {{a}_{2}} & {{a}_{3}} \ {{b}_{1}} & {{b}_{2}} & {{b}_{3}} \ {{c}_{1}} & {{c}_{2}} & {{c}_{3}} \ \end{matrix} \right]\left[ \begin{matrix} x \ y \ z \ \end{matrix} \right]=\left[ \begin{matrix} {{d}_{1}} \ {{d}_{2}} \ {{d}_{3}} \ \end{matrix} \right] \\ \Rightarrow \left[ \begin{matrix} {{a}_{1}}x+{{a}_{2}}y+{{a}_{3}}z \ {{b}_{1}}x+{{b}_{2}}y+{{b}_{3}}z \ {{c}_{1}}x+{{c}_{2}}y+{{c}_{3}}z \ \end{matrix} \right]=\left[ \begin{matrix} {{d}_{1}} \ {{d}_{2}} \ {{d}_{3}} \ \end{matrix} \right] \\ \Rightarrow \text{(i)} \end{array})

Where, \begin{array}{l} A=\left[ \begin{matrix} {{a}_{1}} & {{a}_{2}} & {{a}_{3}} \ {{b}_{1}} & {{b}_{2}} & {{b}_{3}} \ {{c}_{1}} & {{c}_{2}} & {{c}_{3}} \ \end{matrix} \right],\ X=\left[ \begin{matrix} x \ y \ z \ \end{matrix} \right],\ B=\left[ \begin{matrix} {{d}_{1}} \ {{d}_{2}} \ {{d}_{3}} \ \end{matrix} \right] \end{array} .

A is the coefficient matrix, X is the variable matrix, and B is the constant matrix.

Multiplying (i) by (A^{-1}), we get (\begin{array}{l}{A^{-1}}AX = {A^{-1}}B \Rightarrow IX = {A^{-1}}B \\Rightarrow X = {A^{-1}}B\end{array})

The second method to find the solution for the system of equations is Row Reduction or Gaussian Elimination.

  1. The augmented matrix for the linear equations is:

2. Ensure all elements below the main diagonal are zero by using elementary row operations. If a zero is obtained on the diagonal, perform an appropriate row operation to obtain a nonzero element.

3. Back substitution is used to find the solution.

Related Topics:

Introduction to Matrices

Types of Matrices

Matrix Operations

Adjoint and Inverse of a Matrix

Rank of a Matrix and Special Matrices

Solution to a System of Equations

A set of values of x, y, and z which satisfy all the equations simultaneously is called a solution to the system of equations.

Consider, x + y + z = 9

2x - y + z = 5

4x + y - z = 7

The system of linear equations has a solution of x = 2, y = 3, z = 4.

2 + 3 + 4 = 9, 4 - 3 + 4 = 5, and 8 + 3 - 4 = 7

Consistent Equations

If the system of equations has one or more solutions, then it is said to be a consistent system of equations, otherwise, it is an inconsistent system of equations. For example, the system of linear equations x + 3y = 5; x - y = 1 is consistent, because x = 2, y = 1 is a solution to it. However, the system of linear equations x + 3y = 5 ; 2x + 6y = 8 is inconsistent, because there is no set of values of x and y which may satisfy the two equations simultaneously.

Condition for Consistency of a System of Linear Equations AX = B

(a) If (|A| \neq 0), then the system is consistent and has a unique solution, given by (X = A^{-1}B).

If |A| = 0, and (Adj A) B ≠ 0 then the system is inconsistent.

If |A| = 0, and (Adj A) B = 0, then the system is consistent and has infinitely many solutions.

A system of homogeneous linear equations, where AX = 0 and B = 0, is always consistent.

The system has a non-trivial solution (non-zero solution) if |A| = 0.

Theorem 1: If A is an invertible coefficient matrix in a system of linear equations, AX = B, then the system has a unique solution, which is given by X = A-1B.

Proof: A-1AX = A-1B;

Multiplying both sides by A-1

(\begin{array}{l}\Rightarrow AX = B\end{array} )

Since A-1 exists

(\begin{array}{l}\Rightarrow \left| A \right|\ne 0\end{array} )

(\begin{array}{l} \Rightarrow ,,AX=B \ \Rightarrow ,,{{A}^{-1}}AX={{A}^{-1}}B\ \Rightarrow ,,IX={{A}^{-1}}B\ \Rightarrow ,,X={{A}^{-1}}B\end{array} )

The solution to the system of equations AX = B is given by (\begin{array}{l}X = {{A}^{-1}}B\end{array} ).

Uniqueness: If AX = B has two sets of solutions X1 and X2, then AX1 = B and AX2 = B, both of which are equal to B.

AX1 = AX2

A is invertible due to the cancellation law.

X1 = X2

Therefore, the system AX = B has a single, unique solution.

Note: A system of equations is said to be consistent if it has at least one solution.

Solving Linear Equations using Matrix Method

Illustration: Let A = (\begin{array}{l}\left[ \begin{matrix} x+y & y \ 2x & x-y \ \end{matrix} \right],\ B=\left[ \begin{matrix} 2 \ -1 \ \end{matrix} \right],\ C = \left[ \begin{matrix} 3 \ 2 \ \end{matrix} \right]\end{array} ) and assume that AB = C. Then, find the matrix A2.

Given:

This is a heading

Solution:

This is a heading

By solving $$AB = C$$ we get the values of $x$ and $y$. Then by substituting these values in $A$, we obtain $A^2$.

Here $$\begin{array}{l}\left[ \begin{matrix} x+y & y \ 2x & x-y \ \end{matrix} \right]\left[ \begin{matrix} 2 \ -1 \ \end{matrix} \right]=\left[ \begin{matrix} 3 \ 2 \ \end{matrix} \right]\ \Rightarrow \left[ \begin{matrix} 2\left( x+y \right)-y \ 2x.2-\left( x-y \right) \ \end{matrix} \right]=\left[ \begin{matrix} 3 \ 2 \ \end{matrix} \right]\ \Rightarrow 2\left( x+y \right)-y=3 ::and ::4x-\left( x-y \right)=2\end{array} $$

Subtracting the two equations, we get,

$$\begin{array}{l}\Rightarrow ,,2x+y=3;;;;and;;;;3x+y=2 \ \Rightarrow ,,2x-3x=2-3 \ \Rightarrow ,,x=-1 \ \Rightarrow ,,y=5 \end{array}$$

(\begin{array}{l}A=\left[ \begin{matrix} 4 & 5 \ -2 & -6 \ \end{matrix} \right] \\therefore A=\left[ \begin{matrix} -1+5 & 5 \ 2\left( -1 \right) & -1-5 \ \end{matrix} \right]\end{array} )

(\begin{array}{l} \therefore {{A}^{2}} = \left[ \begin{matrix} 16 + 25 & 20 + 30 \ 4 - 12 & -4 - 18 \ \end{matrix} \right] \end{array})

(\begin{array}{l}=\left[ \begin{matrix} 4\times 4+5\left( -2 \right) & 4\times 5+5\left( -6 \right) \ -2\times 4+\left( -6 \right)\left( -2 \right) & -2\times 5+\left( -6 \right)\left( -6 \right) \ \end{matrix} \right]=\left[ \begin{matrix} 6 & -10 \ 4 & 26 \ \end{matrix} \right]\end{array} )

Illustration: Use matrix inversion to solve the following equations

2x + y + 2z = 0

2x - y + z = 10

x + 3y - z = 5

Given:

This is a heading

Solution:

This is a heading

The given equation can be written in matrix form as $$AX = D$$ and then by obtaining $$A^{-1}$$ and multiplying it on both sides, we can solve the given problem.

(\begin{array}{l}\left[ \begin{matrix} 2 & 1 & 2 \ 2 & -1 & 1 \ 1 & 3 & -1 \ \end{matrix} \right]\left[ \begin{matrix} x \ y \ z \ \end{matrix} \right]=\left[ \begin{matrix} 0 \ 10 \ 5 \ \end{matrix} \right]\end{array} )

AX = D where

A =

$$\begin{bmatrix} 2 & 1 & 2 \ 2 & -1 & 1 \ 1 & 3 & -1 \ \end{bmatrix}$$

X =

$$\begin{bmatrix} x \ y \ z \ \end{bmatrix}$$

D =

$$\begin{bmatrix} 0 \ 10 \ 5 \ \end{bmatrix}$$

$$\Rightarrow ,, X = A^{-1}D ,,…..(i)$$

Now $$A^{-1} = \frac{\text{adj } A}{\left|A\right|}; \quad \left|A\right| = \left|\begin{matrix} 2 & 1 & 2 \ 2 & -1 & 1 \ 1 & 3 & -1 \ \end{matrix}\right| = 2(1-3) - 1(-2-1) + 2(6+1) = 13$$

The matrix of co-factors of $\left| A \right|$ is $\left[ \begin{matrix} -2 & 3 & 7 \ 7 & -4 & -5 \ 3 & 2 & -4 \ \end{matrix} \right]$. So, $adj; A ;;=\left[ \begin{matrix} -2 & 7 & 3 \ 3 & -4 & 2 \ 7 & -5 & -4 \ \end{matrix} \right]$

∴ (\left[ \begin{matrix} -2 & 7 & 3 \ 3 & -4 & 2 \ 7 & -5 & -4 \ \end{matrix} \right] \cdot \frac{1}{13} = {{A}^{-1}})

⇒ From (i), $$X = \frac{1}{13} \begin{bmatrix} -2 & 7 & 3 \ 3 & -4 & 2 \ 7 & -5 & -4 \end{bmatrix} \begin{bmatrix} 0 \ 10 \ 5 \end{bmatrix}$$

(\begin{array}{l}=\frac{1}{13}\left[ \begin{matrix} 70+15 \ -40+10 \ -50-20 \ \end{matrix} \right]=\left[ \begin{matrix} 85/13 \ -30/13 \ -70/13 \ \end{matrix} \right]\end{array} )

∴ (\left[ \begin{matrix} x \ y \ z \ \end{matrix} \right]=\left[ \begin{matrix} \frac{85}{13} \ \frac{-30}{13} \ \frac{-70}{13} \ \end{matrix} \right] \Rightarrow ,,x=\frac{85}{13},y=\frac{-30}{13},z=\frac{-70}{13})

Illustration: If $$\left[ \begin{matrix} 2 & 1 \ 7 & 4 \ \end{matrix} \right]A\left[ \begin{matrix} -3 & 2 \ 5 & -3 \ \end{matrix} \right]=\left[ \begin{matrix} 1 & 0 \ 0 & 1 \ \end{matrix} \right],$$

Matrix A =

\begin{bmatrix} 1 & 2 \ 3 & 4 \ \end{bmatrix}

(\begin{array}{l}(a) \left[ \begin{matrix} 7 & 5 \ -11 & -8 \ \end{matrix} \right] ;;;;;(b) \left[ \begin{matrix} 2 & 1 \ 5 & 3 \ \end{matrix} \right] ;;;;;; (c)\left[ \begin{matrix} 7 & 1 \ 34 & 5 \ \end{matrix} \right] ;;;;;; (d) \left[ \begin{matrix} 5 & 3 \ 13 & 8 \ \end{matrix} \right]\end{array} )

Given:

This is a heading

Solution:

This is a heading

(a) We know that if $XAY = I$, then $A = \left( YX \right)^{-1}$.

$$YX=\left[ \begin{matrix} -3 & 2 \ 5 & -3 \ \end{matrix} \right]\left[ \begin{matrix} 2 & 1 \ 7 & 4 \ \end{matrix} \right]=\left[ \begin{matrix} 8 & 5 \ -11 & -7 \ \end{matrix} \right]$$

∴ $$A=\left[ \begin{matrix} 8 & 5 \ -11 & -7 \ \end{matrix} \right]^{-1}=\left[ \begin{matrix} 7 & 5 \ -11 & -8 \ \end{matrix} \right]$$

Illustration: The system of equations $$\left( \begin{matrix} 3 & -2 & 1 \ 5 & -8 & 9 \ 2 & 1 & a \ \end{matrix} \right)\left( \begin{matrix} x \ y \ z \ \end{matrix} \right)=\left( \begin{matrix} b \ 3 \ -1 \ \end{matrix} \right)$$

There is no solution if a and b are

(\begin{array}{l}(a) a \ne -3, b \ne 1/3;;;; (b) a = 2/3, b \ne 1/3 ;;;(c)a \ne 1/4, b = 1/3 ;;;;(d) a \ne -3, b \ne 1/3\end{array} )

Given:

This Is A Heading

Solution:

This Is A Heading

By performing row operations on the given matrices and comparing them, we can get the desired result.

(a) The augmented matrix is given by ( \left( \begin{matrix} 3 & -2 & 1 & | & b \ 5 & -8 & 9 & | & 3 \ 2 & 1 & a & | & -1 \ \end{matrix} \right) )

Applying $$\begin{array}{l}{{R}_{1}}\to 2{{R}_{1}}-{{R}_{2}},\end{array} $$ we get $$\begin{array}{l}\left( A|B \right)\tilde{\ }\left( \begin{matrix} 1 & 4 & -7 \ 0 & -3 & 17 \ 2 & 1 & a \ \end{matrix}\left| \begin{matrix} 2b-3 \ 0 \ -1 \ \end{matrix} \right. \right)\end{array} $$

Applying $\begin{array}{l}{R_2}\to {R_2}-5{R_1},{R_3}\to{R_3}- 2{R_1},\end{array}$ we get $\begin{array}{l}\left( A|B \right)\tilde{\ }\left( \begin{matrix} 1 & 4 & -7 \ 0 & -28 & 44 \ 0 & -7 & a+14 \ \end{matrix}\left| \begin{matrix} 2b-3 \ 18-10b \ 5-4b \ \end{matrix} \right. \right)\end{array}$

The system of equations will have no solution if (\begin{array}{l}-28 \ne 44(5-4b) + (a+14)(18-10b)\end{array} )

(\begin{array}{l}\Rightarrow ,,a+14=11;;;and;;;20-16b \neq 18-10b\end{array} )

(\Rightarrow ,a = -3 ;;and ;;b \neq -1/3 ).

Illustration: Let A = (\begin{bmatrix} 1 & 0 & 0 \ 2 & 1 & 0 \ 3 & 2 & 1 \ \end{bmatrix}).

If $u_1$ and $u_2$ are column matrices such that $Au_1 = \begin{pmatrix} 1 \ 0 \ 0 \ \end{pmatrix}$ and $Au_2 = \begin{pmatrix} 0 \ 1 \ 0 \ \end{pmatrix}$, then $u_1 + u_2$

Equals:

=

\(\begin{array}{l}(a) \left( \begin{matrix} -1 \\ 1 \\ -1 \\ \end{matrix} \right) \;\;\;\;\;\;\; (b) \left( \begin{matrix} -1 \\ -1 \\ 0 \\ \end{matrix} \right)\;\;\;\;\;\; (c)\left( \begin{matrix} 1 \\ -1 \\ -1 \\ \end{matrix} \right) \;\;\;\;\;\; (d) \left( \begin{matrix} -1 \\ 1 \\ 0 \\ \end{matrix} \right)\end{array} \)

Given:

This is a heading

Solution:

This is a heading

(c) Adding Au1 and Au2 we get

A $\left( {{u}_{1}}+{{u}_{2}} \right)$.

Then using the invariance method we obtain

${u}_{1}+{{u}_{2}}$.

We have $$A\left( {{u}_{1}}+{{u}_{2}} \right)=A{{u}_{1}}+A{{u}_{2}}=\left( \begin{matrix} 1 \ 0 \ 0 \ \end{matrix} \right)+\left( \begin{matrix} 0 \ 1 \ 0 \ \end{matrix} \right)=\left( \begin{matrix} 1 \ 1 \ 0 \ \end{matrix} \right)$$ by adding.

We then solve the above equation for (\begin{array}{l}{{u}_{1}}+{{u}_{2}},\end{array} ) if we consider the augmented matrix (A|B) = (\begin{array}{l}\left( \begin{matrix} 1 & 0 & 0 & | & 1 \ 2 & 1 & 0 & | & 1 \ 3 & 2 & 1 & | & 0 \ \end{matrix}\right)\end{array} )

Applying (\begin{array}{l}{{R}_{3}}\to {{R}_{3}}-2{{R}_{2}}+{{R}_{1}} ;;and ;;;{{R}_{2}} \to {{R}_{2}}-2{{R}_{1}}\end{array} ), we get;

(\begin{array}{l}(A|B)\tilde{\ }\left( \begin{matrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \ \end{matrix}\Bigg\rvert \begin{matrix} 1 \ -1 \ -1 \ \end{matrix} \right. \right)\end{array} )

$$\begin{array}{l}{u}{1}+{u}{2}=\left( \begin{matrix} 1 \ -1 \ -1 \ \end{matrix} \right)\end{array}$$

Frequently Asked Questions

A linear equation is an equation that can be written in the form ax + b = 0, where a and b are constants and x is a variable.

An equation is considered linear when it has one or more variables with a degree of one.

  1. Gaussian Elimination
  2. Cramer’s Rule

Matrix multiplication and Gaussian elimination are two methods for solving linear equations using matrices.

Consistent equations refer to equations that have the same number of variables as the number of equations.

Consistent systems of equations are equations that have one or more solutions.

The formula for matrix multiplication used for solving linear equations is: $$AX = B$$

The formula we use is AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constant matrix.



Mock Test for JEE