# How to Solve a System of Equations using Inverse of Matrices?

In mathematics, a matrix is an array of numbers arranged in a rectangular pattern and separated into rows and columns. They’re commonly depicted by enclosing all of the integers within square brackets.

### Determinant

A matrix’s determinant is the scalar value produced for a given square matrix. The determinant is dealt with in linear algebra, and it is computed using the elements of a square matrix. A determinant is a scalar value or number calculated using a square matrix. The square matrix might be 2 × 2, 3 × 3, 4 × 4, or any other form where the number of columns and rows are equal, such as n × n. If S is the set of square matrices, R is the set of integers (real or complex), and f: S → R is defined by f (A) = k, where A ∈ S and k ∈ R, then f (A) is referred to as A’s determinant. A determinant is represented by two vertical lines, i.e., |A|.

Determinant of 2×2 matrix –

Determinant of 3×3 matrix –

### Minors and Cofactors

The matrix created after eliminating the row and column of the matrix in which that specific element lies is defined as the minor of the matrix.

The minor of the element a_{12 }is M_{12} –

The cofactor of an element in matrix A is produced by multiplying the element’s minor _{ }M_{ij }by (-1)^{i+j} . C_{ij }is the symbol for an element’s cofactor. If the minor of a matrix is M_{ij }, then the cofactor of the element would be: C_{ij = }(-1)^{i+j} M_{ij . }The cofactor matrix is the matrix created by the cofactors of the matrix’s components.

Cofactor Matrix :

### Adjoint of a matrix

Let A=[aij] be an n-dimensional square matrix. A matrix A’s adjoint is the transpose of A’s cofactor matrix. It is symbolized by the letter adj A. Adjoint matrices are sometimes known as adjugate matrices. The adjoint of a square matrix A = [aij]n x n is defined as the transpose of the matrix [Aij]n x n, where Aij is the cofactor of the element aij.

Adjoint of A=Transpose of =

### The inverse of a matrix

A square matrix A is invertible if and only if A is a nonsingular matrix. The inverse of a matrix may be obtained by dividing the adjoint of a matrix by the determinant of the matrix. The inverse of a matrix may be computed by following the steps below:

- Step 1: Determine the minor of the provided matrix.
- Step 2: Convert the acquired matrix into the cofactors matrix.
- Step 3: Finally, the adjugate, and
- Step 4: Multiply it by the determinant’s reciprocal.

Let A=

Adjoint of A=Transpose of =

Inverse of matrix A = A^{{-1}} =

**Application of Matrices and Determinants **

Now, let’s look at how determinants and matrices may be used to solve systems of linear equations in two or three variables and to assess the system’s consistency.

**Consistent System**: A system of equations is considered to be consistent if it has (one or more) solutions.**Inconsistent System**: If the solution to a system of equations does not exist, the system is said to be inconsistent.

**Representing linear systems with matrix equations**

An augmented matrix can be used to represent a system of equations. Each row in an augmented matrix represents one of the system’s equations, while each column represents a variable or the constant terms. We can see that augmented matrices are a shortcut for formulating systems of equations in this way.

**Example: Write the following system of equations as an augmented matrix.**

**x – 2y = 5**

**4x – 3y – z = 3**

**5y – 7z = 9**

Let’s write the following matrix in augmented form. If a variable term is not given in the matrix, it is considered that the coefficient of that term is ‘ 0 ‘.

(1)x + (-2)y + (0)z = 5

(4)x + (-3)y + (-1)z = 3

(0)x + (5)y + (-7)z = 9

The following augmented matrix is:

**Solving linear systems with matrix equations**

Solving linear equations using a matrix is done by the Matrix method. In this article, we will look at solving linear equations with matrix examples.

### Solving equations with inverse matrices

Let’s suppose the equation is:

Matrix Method is used to find the solution of the system of the equations. In the equations, all of the variables should be written in the proper order. On the appropriate sides, write the variables, their coefficients, and constants.

The method of determining the inverse is used to solve a system of linear equations, and it requires two additional matrices. The variables are represented by Matrix X. The constants are represented by Matrix B. Using matrix multiplication, a system of equations with the same number of equations as a variable is defined as,

**AX=B**

Let A be the coefficient matrix, X be the variable matrix, and B be the constant matrix to solve a system of linear equations with an inverse matrix. As a result, we’d want to solve the system AX = B. Take a look at the equations below as an example.

AX = B

where:

**Case 1: **If A is a nonsingular matrix, it has an inverse.

Let A be the coefficient matrix, X be the variable matrix, and B be the constant matrix to solve a system of linear equations with an inverse matrix. As a result, we’d want to solve the system AX=B. To get the answer, multiply both sides by the inverse of A.

As the inverse of a matrix is unique, this matrix equation offers a unique solution to the given system of equations. The Matrix Method is a method for solving systems of equations.

**Case 2: **If A is a singular matrix, then | A| = 0. In this case, calculate (adj A) B.

If (adj A) B ≠ O, (O being zero matrices), then the solution does not exist and the system of equations is called inconsistent.

If (adj A) B = O, then the system may be either consistent or inconsistent accordingly as the system has either infinitely many solutions or no solution.

### Sample Problems

**Question 1: Find the following of the given matrix**

**determinant of matrix A****cofactor matrix A****adjoint of matrix A****inverse of matrix A**

**Solution:**

The given matrix is

- Determinant of the A =
= 3(0+8)+5(-2+4)+3(-4)

= 3 × 8 + 5 × 2 + 3 × (-4)

= 24 + 10 – 12 units

- Cofactor of matrix A =
C

_{11} = 0 × (-1) -4 × (-2) = 0 + 8 = 8C

_{12 }= -((-5) × (-1) -3 × (-2)) = -(5 + 6) = -11C

_{13 }= (-5) × 4 -3 × 0 = -20C

_{21 }= −(2 × (-1) -4 × (-1)) = -(-2 + 4) = -2C

_{22 }= 3 × (-1) -3 × (-1) = -3 + 3 = 0C

_{23 }= -(3 × 4 – 3 × 2) = -(12 – 6) = -6C

_{31} = 2 × (-2) – 0 × (-1) = -4C

_{32 }= -(3 × (-2) – (-5) × (-1)) = -(-6 – 5) = 11C

_{33 }= 3 × 0 – (-5) × 2 = 10Cofactor matrix of A =

- AdjoinT of matrix A = transpose of cofactor matrix C =

- Inverse of matrix A =
=

=

**Question 2: Ram is hired for a job with a monthly payment of a specific amount and an annual increase of a predetermined amount. Find his beginning pay and yearly increase if his salary was $300 per month at the end of the first month after 1 year of service and $600 per month at the end of the first month after 3 years of service.**

**Solution:**

Let “x” and “y” represent the monthly salary and a yearly increase of a certain amount, respectively.

According to the question;

x + y = 300 ⇢ (i)

x + 3y = 600 ⇢ (ii)

This can be written as AX = B, where

Determinant of A = 1 × 3 – 1 × 1 = 3 – 1 = 2

Adjoin of A =

Thus,

Using Matrix Inverse,

X = A

^{-1}BTherefore; x = $150, y = $150

So, the monthly salary is $150 and the annual increment is $150.

**Question 3: The sum of three numbers is 3. If we multiple the second number by 2 and add the first number to it, we get 6. If we multiply the third number by 4 and add the second number to it, we get 10. Represent it algebraically and find the numbers using the matrix method.**

**Solution:**

Let x, y, and z represent the first, second, and third numbers, respectively. Then, according to the question, we have

x + y + z = 3

x + 2y = 6

y + 4z = 10

This can be written as AX = B, where

Here, |A|= 1(8 – 0) – 1(4 – 0) + 1(1 – 0) = 8 – 4 + 1 = 5 ≠ 0. Now, find adj A.

A

_{11 }= 8 – 0 = 8, A_{12 }= -(4 – 0) = -4, A_{13 }= 1 – 0 = 1A

_{21 }= -(4 – 1) = -3, A_{22 }= 4 – 0 = 4, A_{23 }= -(1 – 0) = -1A

_{31 }= 0 – 2 = -2, A_{32}= -(0 – 1) = 1, A_{33}= 2 – 1 = 1Adj. A =

Thus,

X = A

^{-1}B

Therefore;

**Question 4: Assume Joe, Max, and Polly went shopping at the mall. Joe pays 45/- for 4 kg of apples, 7 kg of bananas, and 6 kg of guavas, Max pays 30/- for 2 kg of apples and 5 kg of guavas, and Polly pays 35/- for 3 kg of apples, 1 kg of bananas, and 4 kg of guavas. How much do apples, bananas, and guavas cost per kilogram?**

**Solution:**

Let x, y, and z represent the number of apples, bananas, and guavas, respectively.

In accordance to the question:

4x + 7y + 6z = 45

2 x + 5 z = 30

3x + y + 4z = 35

Matrix A contains the kg of apples, bananas, and guavas bought by Joe, Max, and Polly. Matrix B contains the prices paid by the three and matrix X contains the variables.

The solution of the given system of equations be X = A

^{-1}B.In order to find the inverse of A, we will first find the determinant of A.

Determinant of A = |A| = 4(0 × 4 – 1 × 5) – 7(2 × 4 – 5 × 3) + 6(2 × 1 – 3 × 0)

= 4(0 – 5) – 7(8 – 15) + 6(2 – 0)

= -20 – 7(-7) + 12

= -20 + 49 + 12 = 41

Adj. of A =

The cost of apples per kg = 8.3/-

The cost of bananas per kg = 1.1/-

The cost of guavas per kg = 2.7/-

**Question 5: The cost of 2 kg potatoes, 3 kg tomatoes, and 2 kg flour is 50. The cost of 5 kg potatoes, 1 kg tomatoes and 6 kg flour is 40. The cost of 4 kg potatoes, 6 kg tomatoes and 3 kg flour is 60. Find the cost of each item per kg by the inverse of a matrix.**

**Solution:**

Let x, y, and z represent the kg of potatoes, tomatoes, and flour, respectively.

In accordance to the question:

2x + 3y + 2z = 50

5x + 1y + 6z = 40

4x + 6y + 3z = 60

Matrix A contains the kg of potatoes, tomatoes and flour. Matrix B contains the prices paid and matrix X contains the variables. This can be written as AX = B, where

The solution of the given system of equations is X = A

^{-1}B. In order to find the inverse of A, we will first find the determinant of A.Determinant of A |A| = 2(3 – 36) – 3(15 – 24) + 2(30 – 4) = 2 × (-33) – 3(-9) + 2(26) = -66 + 27 + 52 = 13

Now, find the adjoint of A to get the inverse of A.

A

_{11 }= 3 – 36 = -33, A_{12 }= -(15 – 24) = 9, A_{13 }= 30 – 4 = 26A

_{21 }= -(9 – 12) = 3, A_{22 }= 6 – 8 = -2, A_{23 }= -(12 – 12) = 0A

^{{-1}}=A

_{31 }= 18 – 2 = 16, A_{32 }= -(12 – 10) = -2, A_{33 }= 2 – 15 = -13Thus,

X = A

^{-1}Bx = 43.8, y = 19.2, z = 40