MathsTips.com

Maths Help, Free Tutorials And Useful Mathematics Resources

  • Home
  • Algebra
    • Matrices
  • Geometry
  • Trigonometry
  • Calculus
  • Business Maths
  • Arithmetic
  • Statistics
Home » Algebra » Matrices » System of Linear Equations in Matrices

System of Linear Equations in Matrices

In maths, a system of the linear system is a set of two or more linear equation involving the same set of variables. For example : 2x – y = 1, 3x + 2y = 12 . It is a system of two equation in the two variables that is x and y which is called a two linear equation in two unknown x and y and solution to a linear equation is the value to the variables such that all the equations are fulfilled.

In the matrix, every equation in the system becomes a row and each variable in the system becomes a column and the variables are dropped and the coefficients are placed into a matrix.

A system of two linear equations in two unknown x and y are as follows:  \left.\begin{matrix} a_{11}x + a_{12}y = b_{1} & \\ a_{21}x + a_{22}y = b_{2} & \end{matrix}\right\}

Let  A=\begin {bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} , X=\begin {bmatrix} x\\ y\end{bmatrix} , B=\begin {bmatrix} {b1}\\ {b2}\end{bmatrix} .

Then system of equation can be written in matrix form as: 

 \begin {bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin {bmatrix} x\\ y\end{bmatrix} =  \begin {bmatrix} {b1}\\ {b2}\end{bmatrix} i.e. AX = B and  X =   A^{-1}B  .

If the R.H.S., namely B is 0 then the system is homogeneous, otherwise non-homogeneous.

 \left.\begin{matrix} x+6y=0 & \\ 7x-5y=0 & \end{matrix}\right\} is a homogeneous system of two eqations in two unknowns x and y.

 \left.\begin{matrix} 4x+6y=8 & \\ 9x-5y=0 & \end{matrix}\right\} is a non-homogenoeus system of equations.

A system of three linear equations in three unknown x, y, z are as follows:  

 \left.\begin{matrix} a_{11}x + a_{12}y + a_{13}z = b_{1} & \\ a_{21}x + a_{22}y + a_{23}z = b_{2} & \\ a_{31}x + a_{32}y + a_{33}z = b_{3} \end{matrix}\right\} .

Let  A=\begin {bmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33}\end{bmatrix} , X=\begin {bmatrix} x\\ y \\ z\end{bmatrix} , B=\begin {bmatrix} {b1}\\ {b2} \\ b3\end{bmatrix} . 

Then system of equation can be written in matrix form as: 

 \begin {bmatrix} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33}\end{bmatrix} \begin {bmatrix} x\\ y \\ z\end{bmatrix} = \begin {bmatrix} {b1}\\ {b2} \\ b3\end{bmatrix}  i.e. AX = B and  X =   A^{-1}B  .

Algorithm to solve the Linear Equation via Matrix

  1. Write the given system in the form of matrix equation as AX = B.
  2. Find the determinant of the matrix. If determinant |A| = 0, then   A^{-1}  does not exist so that solution does not exist. Write “System is not consistent”.
  3. If the determinant exist then find the inverse of the matrix i.e.   A^{-1}  .
  4. Find   X = A^{-1}B  where   A^{-1}  is the inverse of the matrix.
  5. Solve the equation by the matrix method of linear equation with the formula   X = A^{-1}B  and find the values of x,y,z.

Example 1: Solve the equation: 4x+7y-9 = 0 , 5x-8y+15 = 0

Solution: Given equation can be written in matrix form as :  A=\begin {bmatrix} 4 & 7\\ 5 &-8 \end {bmatrix} , X=\begin {bmatrix} x\\ y\end{bmatrix} , B=\begin {bmatrix} 9\\ -15\end{bmatrix}

Given system can be written as : AX = B , where   X = A^{-1}B  .

Let us find determinant : |A| = 4*(-8) – 5*7 = -32-35 = -67 So, solution exist.

Minor and Cofactor of matrix A are :  M_{11} = -8  C_{11} = -8,  M_{12} = 5  C_{12} = -5,  M_{21} = 7  C_{21} = -7,  M_{22} = 4  C_{22} = 4.

Cofactor matrix =  \begin {bmatrix} -8 & -5\\ -7 &4 \end {bmatrix}   and Adj A =  \begin {bmatrix} -8 & -7\\ -5 &4 \end {bmatrix}

 A^{-1} = \frac{1}{|A|} adj A    = \frac{-1}{67}\begin {bmatrix} -8 & -7\\ -5 &4 \end {bmatrix} .

  X = A^{-1}B  =  \frac{-1}{67}\begin {bmatrix} -8 & -7\\ -5 &4 \end {bmatrix} \begin {bmatrix} 9\\ -15\end{bmatrix} =  \frac{-1}{67}\begin {bmatrix} -72+105 &\\-45-60 \end {bmatrix} =  \frac{-1}{67}\begin {bmatrix} 33 &\\-105 \end {bmatrix}

x =  -\frac{33}{67} and y =  \frac{105}{67}

Example 2: Solve the equation: 2x+y+3z = 1, x+z = 2, 2x+y+z = 3

Solution: Given equation can be written in matrix form as :  A=\begin {bmatrix} 2 &1 &3 \\ 1&0&1 \\ 2&1&1 \end {bmatrix} , X=\begin {bmatrix} x\\ y \\ z\end{bmatrix} , B=\begin {bmatrix} 1\\ 2 \\ 3\end{bmatrix} .

Given system can be written as : AX = B , where   X = A^{-1}B  .

Let us find determinant : |A| = 2(0-1) – 1(1-2) + 3(1-0) = -2+1+3 = 2. So, solution exist.

Minor and Cofactor of matrix A are :  M_{11} = -1  C_{11} = -1,  M_{12} = -1  C_{12} = 1, M_{13} = 1  C_{13} = 1,  M_{21} = -2  C_{21} = 2,  M_{22} = -4  C_{22} = -4, M_{23} = 0  C_{23} = 0  M_{31} = 1  C_{31} = -1,  M_{32} = -1  C_{32} = -1, M_{33} = -1  C_{33} = 1.

 Cofactor=\begin {bmatrix} -1 &1 &1 \\ 2&-4&0 \\ 1&1&-1 \end {bmatrix} and  Adj(A)=\begin {bmatrix} -1 &2&1 \\ 1&-4&1 \\ 1&0&-1 \end {bmatrix}

 A^{-1} = \frac{1}{|A|} adj A    = \frac{1}{2}\begin {bmatrix} -1 &2&1 \\ 1&-4&1 \\ 1&0&-1 \end {bmatrix} .

  X = A^{-1}B  =  \frac{1}{2}\begin {bmatrix} -1 &2&1 \\ 1&-4&1 \\ 1&0&-1 \end {bmatrix} \begin {bmatrix} 1\\ 2 \\ 3\end{bmatrix} = \frac{1}{2}\begin {bmatrix}-1+4+3\\1-8+3\\1+0-3 \end {bmatrix} = \frac{1}{2}\begin {bmatrix}6\\-4\\-2 \end {bmatrix} = \begin {bmatrix}3\\-2\\-1 \end {bmatrix} .

x = 3, y = -2, z = -1.

Exercise

Solve the following equations:

  1. 2x+3y=9, -x+y=-2.
  2. x+3y=-2, 3x+5y=4.
  3. x+y=1, 3y+3z=5, 3z+3x=4.
  4. x+y+z=1, 2x+y+2z=3, 3x+3y+4z=4.
  5. x+y+z=6, 3x-y+3z=10, 5x+5y-4z=3.
« Inverse of a Matrix


Filed Under: Matrices

Comments

  1. Prakash Krishna says

    June 5, 2018 at 3:34 am

    2x+3y+1=0 and x+2y-2=0 equations using matrix method

    Reply
    • Suraj thapa says

      December 4, 2019 at 4:37 pm

      It doesn’t solved my problem

      Reply

Leave a Reply Cancel reply

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

Table of Content

  • Introduction to Matrices
  • Addition Of Matrices
  • Subtraction Of Matrix
  • Multiplication of Matrices
  • Determinant of Matrices
  • Co-factor of Matrices
  • Minor of Matrices
  • Transpose and Adjoint of Matrices
  • Inverse of a Matrix
  • System of Linear Equations in Matrices

© MathsTips.com 2013 - 2023. All Rights Reserved.