Maths and AI | Inverse of A Matrix

Adarsh Pathak
Mathematics and AI
Published in
3 min readApr 17, 2020

Second article of Linear Algebra series.

In previous article I explain about matrix and its multiplication and Transpose of matrix. In this article we will find the inverse of a matrix and its importance.

What is inverse?

Let’s take a example to understand better this concept. given a number A= 8 , you have to find the inverse of A. To calculate this we have to just get reciprocal of the number that is 1/8 . If you multiply number with its inverse you will get 1. Same concept had been used in matrix inverse also. Only difference here is that here you have to calculate inverse of a arranged collection of numbers in systematic way. So that if we multiply original matrix with its inverse we get Identity matrix.

Why we need Inverse of matrix?

If we take a simple example of two linear equation. And you have to calculate the variables x and y. We can solve this problem in two ways.

two linear equation

1st Method is put the value of y = 10–4x in first equation and get value of x and then value of y. But this method will be so difficult if we have large set of variables. In that case you have to use matrix method. In computer programming implementing matrix is much easier than any other method.

Matrix form of equation

We can rewrite the above equation in matrix form. Here our linear equation in matrix form is:

AX = b

X = b/A

we know that 1/A is inverse of A.

X = b* Inverse(A);

to get the value of X we have to divide b with A. In matrix you can not simply divide two matrices. But we know how to multiply matrices. So to get the value of X we have to multiply b with inverse of A.

Now the most important question is how to calculate inverse of A?

We have to check some points before our calculation.

  1. Number of rows should be equal to number of columns.(Square matrix)
  2. It’s determinant must not be equal to zero.

Steps to calculate inverse of a matrix.

  1. Calculate determinant of the matrix. In this example determinant is (2*1–3*4 = -10).
  2. Find adjoint of matrix.
  3. Inverse(A) = adjoint(A)/(determinant(A))
Inverse of A

Once you calculate the inverse matrix simply multiply with b matrix. That will be your final answer of X.

Inverse of a matrix is one of the most important term in Machine learning or computer programming. You can find in-build functions in many programming languages to calculate inverse of matrix.

So I hope you have some better understanding about the importance if Inverse in matrix and its some basic use. I will explain other uses of it in Machine learning.

--

--