• 90% Refund @Courses
  • School Guide
  • Class 12 Syllabus
  • Class 12 Revision Notes
  • Maths Notes Class 12
  • Physics Notes Class 12
  • Chemistry Notes Class 12
  • Biology Notes Class 12
  • NCERT Solutions Class 12 Maths
  • RD Sharma Solutions Class 12

Related Articles

  • DSA to Development
  • Area between Polar Curves
  • Evaluating Definite Integrals
  • Applications of Matrices and Determinants
  • Matrix Operations
  • Riemann Sum
  • Critical Points
  • Absolute Minima and Maxima
  • Computing Definite Integrals
  • Improper Integrals
  • Advanced Differentiation
  • Area as Definite Integral
  • Riemann Sums in Summation Notation
  • Logarithmic Differentiation - Continuity and Differentiability
  • Derivatives of Composite Functions
  • Reverse Chain Rule
  • Derivatives of Inverse Functions
  • Definite Integral as the Limit of a Riemann Sum
  • Derivatives as Rate of Change

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.

how to solve equations using inverse matrix

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 –     

\left[\begin{matrix}a&b\\c&d\\\end{matrix}\right] = a ×d - b  ×c

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.

\left[\begin{matrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\\\end{matrix}\right]=\left[\begin{matrix}a_{21}&a_{23}\\a_{31}&a_{33}\\\end{matrix}\right]

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.

\left[\begin{matrix}C_{11}&C_{12}&C_{13}\\C_{21}&C_{22}&C_{23}\\C_{31}&C_{32}&C_{33}\\\end{matrix}\right]

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. 

Let A = \left[\begin{matrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\\\end{matrix}\right]

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.

 \left[\begin{matrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\\\end{matrix}\right]

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.

how to solve equations using inverse matrix

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

\left[\begin{matrix}1&-2&0&5\\4&-3&-1&3\\0&5&-7&9\\\end{matrix}\right]

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

a_1x+a_1y+a_3z=d_1 \\b_1x+b_2y+b_3z=d_2\\ c_1x+c_2y+c_3z=d_3

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,

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.

\left[\begin{matrix}a_1x+a_2y+a_3z\\b_1x+b_2y+b_3z\\c_1x+c_2y+c_3z\\\end{matrix}\right]=\left[\begin{matrix}d_1\\d_2\\d_3\\\end{matrix}\right]

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.

(A^{-1})AX=(A^{-1})B [(A^{-1})A]X=(A^{-1})B IX=(A^{-1})B X=(A^{-1})B

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

A=\left[\begin{matrix}3&2&-1\\-5&0&-2\\3&4&-1\\\end{matrix}\right]

  • determinant of matrix A
  • cofactor matrix A 
  • adjoint of matrix A
  • inverse of matrix A
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 = 8 C 12 ​= -((-5) × (-1) -3 × (-2)) = -(5 + 6) = -11 C 13 ​ = (-5) × 4 -3 × 0 = -20 C 21 = −(2 × (-1) -4 × (-1)) = -(-2 + 4) = -2 C 22 ​= 3 × (-1) -3 × (-1) = -3 + 3 = 0   C 23 ​ = -(3 × 4 – 3 × 2) = -(12 – 6) = -6 C 31 ​ = 2 × (-2) – 0 × (-1) = -4              C 32 ​= -(3 × (-2) – (-5) × (-1)) = -(-6 – 5) = 11    C 33​ = 3 × 0 – (-5) × 2 = 10 Cofactor 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.

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 B Therefore; 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.

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 = 1 A 21 = -(4 – 1) = -3, A 22 = 4 – 0 = 4, A 23 = -(1 – 0) = -1 A 31 = 0 – 2 = -2, A 32 = -(0 – 1) = 1, A 33 = 2 – 1 = 1 Adj. 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?

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.

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 = 26 A 21 = -(9 – 12) = 3, A 22 = 6 – 8 = -2, A 23 = -(12 – 12) = 0 A {-1} = A 31 = 18 – 2 = 16, A 32 = -(12 – 10) = -2, A 33 = 2 – 15 = -13 Thus,  X = A -1 B x = 43.8, y = 19.2, z = 40                                                     

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now !

Please Login to comment...

author

  • Matrices-MAQ
  • School Learning
  • School Mathematics

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

  • 7.7 Solving Systems with Inverses
  • Introduction to Prerequisites
  • 1.1 Real Numbers: Algebra Essentials
  • 1.2 Exponents and Scientific Notation
  • 1.3 Radicals and Rational Exponents
  • 1.4 Polynomials
  • 1.5 Factoring Polynomials
  • 1.6 Rational Expressions
  • Key Equations
  • Key Concepts
  • Review Exercises
  • Practice Test
  • Introduction to Equations and Inequalities
  • 2.1 The Rectangular Coordinate Systems and Graphs
  • 2.2 Linear Equations in One Variable
  • 2.3 Models and Applications
  • 2.4 Complex Numbers
  • 2.5 Quadratic Equations
  • 2.6 Other Types of Equations
  • 2.7 Linear Inequalities and Absolute Value Inequalities
  • Introduction to Functions
  • 3.1 Functions and Function Notation
  • 3.2 Domain and Range
  • 3.3 Rates of Change and Behavior of Graphs
  • 3.4 Composition of Functions
  • 3.5 Transformation of Functions
  • 3.6 Absolute Value Functions
  • 3.7 Inverse Functions
  • Introduction to Linear Functions
  • 4.1 Linear Functions
  • 4.2 Modeling with Linear Functions
  • 4.3 Fitting Linear Models to Data
  • Introduction to Polynomial and Rational Functions
  • 5.1 Quadratic Functions
  • 5.2 Power Functions and Polynomial Functions
  • 5.3 Graphs of Polynomial Functions
  • 5.4 Dividing Polynomials
  • 5.5 Zeros of Polynomial Functions
  • 5.6 Rational Functions
  • 5.7 Inverses and Radical Functions
  • 5.8 Modeling Using Variation
  • Introduction to Exponential and Logarithmic Functions
  • 6.1 Exponential Functions
  • 6.2 Graphs of Exponential Functions
  • 6.3 Logarithmic Functions
  • 6.4 Graphs of Logarithmic Functions
  • 6.5 Logarithmic Properties
  • 6.6 Exponential and Logarithmic Equations
  • 6.7 Exponential and Logarithmic Models
  • 6.8 Fitting Exponential Models to Data
  • Introduction to Systems of Equations and Inequalities
  • 7.1 Systems of Linear Equations: Two Variables
  • 7.2 Systems of Linear Equations: Three Variables
  • 7.3 Systems of Nonlinear Equations and Inequalities: Two Variables
  • 7.4 Partial Fractions
  • 7.5 Matrices and Matrix Operations
  • 7.6 Solving Systems with Gaussian Elimination
  • 7.8 Solving Systems with Cramer's Rule
  • Introduction to Analytic Geometry
  • 8.1 The Ellipse
  • 8.2 The Hyperbola
  • 8.3 The Parabola
  • 8.4 Rotation of Axes
  • 8.5 Conic Sections in Polar Coordinates
  • Introduction to Sequences, Probability and Counting Theory
  • 9.1 Sequences and Their Notations
  • 9.2 Arithmetic Sequences
  • 9.3 Geometric Sequences
  • 9.4 Series and Their Notations
  • 9.5 Counting Principles
  • 9.6 Binomial Theorem
  • 9.7 Probability

Learning Objectives

In this section, you will:

  • Find the inverse of a matrix.
  • Solve a system of linear equations using an inverse matrix.

Nancy plans to invest $10,500 into two different bonds to spread out her risk. The first bond has an annual return of 10%, and the second bond has an annual return of 6%. In order to receive an 8.5% return from the two bonds, how much should Nancy invest in each bond? What is the best method to solve this problem?

There are several ways we can solve this problem. As we have seen in previous sections, systems of equations and matrices are useful in solving real-world problems involving finance. After studying this section, we will have the tools to solve the bond problem using the inverse of a matrix.

Finding the Inverse of a Matrix

We know that the multiplicative inverse of a real number a a is a −1 , a −1 , and a a −1 = a −1 a = ( 1 a ) a = 1. a a −1 = a −1 a = ( 1 a ) a = 1. For example, 2 −1 = 1 2 2 −1 = 1 2 and ( 1 2 ) 2 = 1. ( 1 2 ) 2 = 1. The multiplicative inverse of a matrix is similar in concept, except that the product of matrix A A and its inverse A −1 A −1 equals the identity matrix . The identity matrix is a square matrix containing ones down the main diagonal and zeros everywhere else. We identify identity matrices by I n I n where n n represents the dimension of the matrix. [link] and the following equations.

The identity matrix acts as a 1 in matrix algebra. For example, A I = I A = A . A I = I A = A .

A matrix that has a multiplicative inverse has the properties

A matrix that has a multiplicative inverse is called an invertible matrix . Only a square matrix may have a multiplicative inverse, as the reversibility, A A −1 = A −1 A = I , A A −1 = A −1 A = I , is a requirement. Not all square matrices have an inverse, but if A A is invertible, then A −1 A −1 is unique. We will look at two methods for finding the inverse of a 2 × 2 2 × 2 matrix and a third method that can be used on both 2 × 2 2 × 2 and 3 × 3 3 × 3 matrices.

The Identity Matrix and Multiplicative Inverse

The identity matrix , I n , I n , is a square matrix containing ones down the main diagonal and zeros everywhere else.

If A A is an n × n n × n matrix and B B is an n × n n × n matrix such that A B = B A = I n , A B = B A = I n , then B = A −1 , B = A −1 , the multiplicative inverse of a matrix A . A .

Showing That the Identity Matrix Acts as a 1

Given matrix A , show that A I = I A = A . A I = I A = A .

Use matrix multiplication to show that the product of A A and the identity is equal to the product of the identity and A.

Given two matrices, show that one is the multiplicative inverse of the other.

  • Given matrix A A of order n × n n × n and matrix B B of order n × n n × n multiply A B . A B .
  • If A B = I , A B = I , then find the product B A . B A . If B A = I , B A = I , then B = A −1 B = A −1 and A = B −1 . A = B −1 .

Showing That Matrix A Is the Multiplicative Inverse of Matrix B

Show that the given matrices are multiplicative inverses of each other.

Multiply A B A B and B A . B A . If both products equal the identity, then the two matrices are inverses of each other.

A A and B B are inverses of each other.

Show that the following two matrices are inverses of each other.

Finding the Multiplicative Inverse Using Matrix Multiplication

We can now determine whether two matrices are inverses, but how would we find the inverse of a given matrix? Since we know that the product of a matrix and its inverse is the identity matrix, we can find the inverse of a matrix by setting up an equation using matrix multiplication .

Use matrix multiplication to find the inverse of the given matrix.

For this method, we multiply A A by a matrix containing unknown constants and set it equal to the identity.

Find the product of the two matrices on the left side of the equal sign.

Next, set up a system of equations with the entry in row 1, column 1 of the new matrix equal to the first entry of the identity, 1. Set the entry in row 2, column 1 of the new matrix equal to the corresponding entry of the identity, which is 0.

Using row operations, multiply and add as follows: ( −2 ) R 1 + R 2 → R 2 . ( −2 ) R 1 + R 2 → R 2 . Add the equations, and solve for c . c .

Back-substitute to solve for a . a .

Write another system of equations setting the entry in row 1, column 2 of the new matrix equal to the corresponding entry of the identity, 0. Set the entry in row 2, column 2 equal to the corresponding entry of the identity.

Using row operations, multiply and add as follows: ( −2 ) R 1 + R 2 = R 2 . ( −2 ) R 1 + R 2 = R 2 . Add the two equations and solve for d . d .

Once more, back-substitute and solve for b . b .

Finding the Multiplicative Inverse by Augmenting with the Identity

Another way to find the multiplicative inverse is by augmenting with the identity. When matrix A A is transformed into I , I , the augmented matrix I I transforms into A −1 . A −1 .

For example, given

augment A A with the identity

Perform row operations with the goal of turning A A into the identity.

  • Switch row 1 and row 2. [ 5 3 2 1 | 0 1 1 0 ] [ 5 3 2 1 | 0 1 1 0 ]
  • Multiply row 2 by −2 −2 and add to row 1. [ 1 1 2 1 | −2 1 1 0 ] [ 1 1 2 1 | −2 1 1 0 ]
  • Multiply row 1 by −2 −2 and add to row 2. [ 1 1 0 −1 | −2 1 5 −2 ] [ 1 1 0 −1 | −2 1 5 −2 ]
  • Add row 2 to row 1. [ 1 0 0 −1 | 3 −1 5 −2 ] [ 1 0 0 −1 | 3 −1 5 −2 ]
  • Multiply row 2 by −1. −1. [ 1 0 0 1 | 3 −1 −5 2 ] [ 1 0 0 1 | 3 −1 −5 2 ]

The matrix we have found is A −1 . A −1 .

Finding the Multiplicative Inverse of 2×2 Matrices Using a Formula

When we need to find the multiplicative inverse of a 2 × 2 2 × 2 matrix, we can use a special formula instead of using matrix multiplication or augmenting with the identity.

If A A is a 2 × 2 2 × 2 matrix, such as

the multiplicative inverse of A A is given by the formula

where a d − b c ≠ 0. a d − b c ≠ 0. If a d − b c = 0 , a d − b c = 0 , then A A has no inverse.

Using the Formula to Find the Multiplicative Inverse of Matrix A

Use the formula to find the multiplicative inverse of

Using the formula, we have

We can check that our formula works by using one of the other methods to calculate the inverse. Let’s augment A A with the identity.

  • Multiply row 1 by −2 −2 and add to row 2. [ 1 −2 0 1 | 1 0 −2 1 ] [ 1 −2 0 1 | 1 0 −2 1 ]
  • Multiply row 1 by 2 and add to row 1. [ 1 0 0 1 | −3 2 −2 1 ] [ 1 0 0 1 | −3 2 −2 1 ]

So, we have verified our original solution.

Use the formula to find the inverse of matrix A . A . Verify your answer by augmenting with the identity matrix.

Finding the Inverse of the Matrix, If It Exists

Find the inverse, if it exists, of the given matrix.

We will use the method of augmenting with the identity.

  • Switch row 1 and row 2. [ 1 3 3 2 | 0 1 1 0 ] [ 1 3 3 2 | 0 1 1 0 ]
  • Multiply row 1 by −3 and add it to row 2. [ 1 2 0 0 | 1 0 −3 1 ] [ 1 2 0 0 | 1 0 −3 1 ]
  • There is nothing further we can do. The zeros in row 2 indicate that this matrix has no inverse.

Finding the Multiplicative Inverse of 3×3 Matrices

Unfortunately, we do not have a formula similar to the one for a 2 × 2 2 × 2 matrix to find the inverse of a 3 × 3 3 × 3 matrix. Instead, we will augment the original matrix with the identity matrix and use row operations to obtain the inverse.

Given a 3 × 3 3 × 3 matrix

augment A A with the identity matrix

To begin, we write the augmented matrix with the identity on the right and A A on the left. Performing elementary row operations so that the identity matrix appears on the left, we will obtain the inverse matrix on the right. We will find the inverse of this matrix in the next example.

Given a 3 × 3 3 × 3 matrix, find the inverse

  • Write the original matrix augmented with the identity matrix on the right.
  • Use elementary row operations so that the identity appears on the left.
  • What is obtained on the right is the inverse of the original matrix.
  • Use matrix multiplication to show that A A −1 = I A A −1 = I and A −1 A = I . A −1 A = I .

Finding the Inverse of a 3 × 3 Matrix

Given the 3 × 3 3 × 3 matrix A , A , find the inverse.

Augment A A with the identity matrix, and then begin row operations until the identity matrix replaces A . A . The matrix on the right will be the inverse of A . A .

To prove that B = A −1 , B = A −1 , let’s multiply the two matrices together to see if the product equals the identity, if A A −1 = I A A −1 = I and A −1 A = I . A −1 A = I .

Find the inverse of the 3 × 3 3 × 3 matrix.

Solving a System of Linear Equations Using the Inverse of a Matrix

Solving a system of linear equations using the inverse of a matrix requires the definition of two new matrices: X X is the matrix representing the variables of the system, and B B is the matrix representing the constants. Using matrix multiplication , we may define a system of equations with the same number of equations as variables as

To solve a system of linear equations using an inverse matrix , let A A be the coefficient matrix , let X X be the variable matrix, and let B B be the constant matrix. Thus, we want to solve a system A X = B . A X = B . For example, look at the following system of equations.

From this system, the coefficient matrix is

The variable matrix is

And the constant matrix is

Then A X = B A X = B looks like

Recall the discussion earlier in this section regarding multiplying a real number by its inverse, ( 2 −1 ) 2 = ( 1 2 ) 2 = 1. ( 2 −1 ) 2 = ( 1 2 ) 2 = 1. To solve a single linear equation a x = b a x = b for x , x , we would simply multiply both sides of the equation by the multiplicative inverse (reciprocal) of a . a . Thus,

The only difference between a solving a linear equation and a system of equations written in matrix form is that finding the inverse of a matrix is more complicated, and matrix multiplication is a longer process. However, the goal is the same—to isolate the variable.

We will investigate this idea in detail, but it is helpful to begin with a 2 × 2 2 × 2 system and then move on to a 3 × 3 3 × 3 system.

Solving a System of Equations Using the Inverse of a Matrix

Given a system of equations, write the coefficient matrix A , A , the variable matrix X , X , and the constant matrix B . B . Then

Multiply both sides by the inverse of A A to obtain the solution.

If the coefficient matrix does not have an inverse, does that mean the system has no solution?

No, if the coefficient matrix is not invertible, the system could be inconsistent and have no solution, or be dependent and have infinitely many solutions.

Solving a 2 × 2 System Using the Inverse of a Matrix

Solve the given system of equations using the inverse of a matrix.

Write the system in terms of a coefficient matrix, a variable matrix, and a constant matrix.

First, we need to calculate A −1 . A −1 . Using the formula to calculate the inverse of a 2 by 2 matrix, we have:

Now we are ready to solve. Multiply both sides of the equation by A −1 . A −1 .

The solution is ( −1 , 1 ) . ( −1 , 1 ) .

Can we solve for X X by finding the product B A −1 ? B A −1 ?

No, recall that matrix multiplication is not commutative, so A −1 B ≠ B A −1 . A −1 B ≠ B A −1 . Consider our steps for solving the matrix equation.

Notice in the first step we multiplied both sides of the equation by A −1 , A −1 , but the A −1 A −1 was to the left of A A on the left side and to the left of B B on the right side. Because matrix multiplication is not commutative, order matters.

Solving a 3 × 3 System Using the Inverse of a Matrix

Solve the following system using the inverse of a matrix.

Write the equation A X = B . A X = B .

First, we will find the inverse of A A by augmenting with the identity.

Multiply row 1 by 1 5 . 1 5 .

Multiply row 1 by 4 and add to row 2.

Add row 1 to row 3.

Multiply row 2 by −3 and add to row 1.

Multiply row 3 by 5.

Multiply row 3 by 1 5 1 5 and add to row 1.

Multiply row 3 by − 19 5 − 19 5 and add to row 2.

Multiply both sides of the equation by A −1 . A −1 . We want A −1 A X = A −1 B : A −1 A X = A −1 B :

The solution is ( 1 , 2 , 0 ) . ( 1 , 2 , 0 ) .

Solve the system using the inverse of the coefficient matrix.

Given a system of equations, solve with matrix inverses using a calculator.

  • Save the coefficient matrix and the constant matrix as matrix variables [ A ] [ A ] and [ B ] . [ B ] .
  • Enter the multiplication into the calculator, calling up each matrix variable as needed.
  • If the coefficient matrix is invertible, the calculator will present the solution matrix; if the coefficient matrix is not invertible, the calculator will present an error message.

Using a Calculator to Solve a System of Equations with Matrix Inverses

Solve the system of equations with matrix inverses using a calculator

On the matrix page of the calculator, enter the coefficient matrix as the matrix variable [ A ] , [ A ] , and enter the constant matrix as the matrix variable [ B ] . [ B ] .

On the home screen of the calculator, type in the multiplication to solve for X , X , calling up each matrix variable as needed.

Evaluate the expression.

Access these online resources for additional instruction and practice with solving systems with inverses.

  • The Identity Matrix
  • Determining Inverse Matrices
  • Using a Matrix Equation to Solve a System of Equations

7.7 Section Exercises

In a previous section, we showed that matrix multiplication is not commutative, that is, A B ≠ B A A B ≠ B A in most cases. Can you explain why matrix multiplication is commutative for matrix inverses, that is, A −1 A = A A −1 ? A −1 A = A A −1 ?

Does every 2 × 2 2 × 2 matrix have an inverse? Explain why or why not. Explain what condition is necessary for an inverse to exist.

Can you explain whether a 2 × 2 2 × 2 matrix with an entire row of zeros can have an inverse?

Can a matrix with an entire column of zeros have an inverse? Explain why or why not.

Can a matrix with zeros on the diagonal have an inverse? If so, find an example. If not, prove why not. For simplicity, assume a 2 × 2 2 × 2 matrix.

In the following exercises, show that matrix A A is the inverse of matrix B . B .

A = [ 1 0 −1 1 ] , B = [ 1 0 1 1 ] A = [ 1 0 −1 1 ] , B = [ 1 0 1 1 ]

A = [ 1 2 3 4 ] , B = [ −2 1 3 2 − 1 2 ] A = [ 1 2 3 4 ] , B = [ −2 1 3 2 − 1 2 ]

A = [ 4 5 7 0 ] , B = [ 0 1 7 1 5 − 4 35 ] A = [ 4 5 7 0 ] , B = [ 0 1 7 1 5 − 4 35 ]

A = [ −2 1 2 3 −1 ] , B = [ −2 −1 −6 −4 ] A = [ −2 1 2 3 −1 ] , B = [ −2 −1 −6 −4 ]

A = [ 1 0 1 0 1 −1 0 1 1 ] , B = 1 2 [ 2 1 −1 0 1 1 0 −1 1 ] A = [ 1 0 1 0 1 −1 0 1 1 ] , B = 1 2 [ 2 1 −1 0 1 1 0 −1 1 ]

A = [ 1 2 3 4 0 2 1 6 9 ] , B = 1 4 [ 6 0 −2 17 −3 −5 −12 2 4 ] A = [ 1 2 3 4 0 2 1 6 9 ] , B = 1 4 [ 6 0 −2 17 −3 −5 −12 2 4 ]

A = [ 3 8 2 1 1 1 5 6 12 ] , B = 1 36 [ −6 84 −6 7 −26 1 −1 −22 5 ] A = [ 3 8 2 1 1 1 5 6 12 ] , B = 1 36 [ −6 84 −6 7 −26 1 −1 −22 5 ]

For the following exercises, find the multiplicative inverse of each matrix, if it exists.

[ 3 −2 1 9 ] [ 3 −2 1 9 ]

[ −2 2 3 1 ] [ −2 2 3 1 ]

[ −3 7 9 2 ] [ −3 7 9 2 ]

[ −4 −3 −5 8 ] [ −4 −3 −5 8 ]

[ 1 1 2 2 ] [ 1 1 2 2 ]

[ 0 1 1 0 ] [ 0 1 1 0 ]

[ 0.5 1.5 1 −0.5 ] [ 0.5 1.5 1 −0.5 ]

[ 1 0 6 −2 1 7 3 0 2 ] [ 1 0 6 −2 1 7 3 0 2 ]

[ 0 1 −3 4 1 0 1 0 5 ] [ 0 1 −3 4 1 0 1 0 5 ]

[ 1 2 −1 −3 4 1 −2 −4 −5 ] [ 1 2 −1 −3 4 1 −2 −4 −5 ]

[ 1 9 −3 2 5 6 4 −2 7 ] [ 1 9 −3 2 5 6 4 −2 7 ]

[ 1 −2 3 −4 8 −12 1 4 2 ] [ 1 −2 3 −4 8 −12 1 4 2 ]

[ 1 2 1 2 1 2 1 3 1 4 1 5 1 6 1 7 1 8 ] [ 1 2 1 2 1 2 1 3 1 4 1 5 1 6 1 7 1 8 ]

[ 1 2 3 4 5 6 7 8 9 ] [ 1 2 3 4 5 6 7 8 9 ]

For the following exercises, solve the system using the inverse of a 2 × 2 2 × 2 matrix.

5 x − 6 y = − 61 4 x + 3 y = − 2 5 x − 6 y = − 61 4 x + 3 y = − 2

8 x + 4 y = −100 3 x −4 y = 1 8 x + 4 y = −100 3 x −4 y = 1

3 x −2 y = 6 − x + 5 y = −2 3 x −2 y = 6 − x + 5 y = −2

5 x −4 y = −5 4 x + y = 2.3 5 x −4 y = −5 4 x + y = 2.3

−3 x −4 y = 9 12 x + 4 y = −6 −3 x −4 y = 9 12 x + 4 y = −6

−2 x + 3 y = 3 10 − x + 5 y = 1 2 −2 x + 3 y = 3 10 − x + 5 y = 1 2

8 5 x − 4 5 y = 2 5 − 8 5 x + 1 5 y = 7 10 8 5 x − 4 5 y = 2 5 − 8 5 x + 1 5 y = 7 10

1 2 x + 1 5 y = − 1 4 1 2 x − 3 5 y = − 9 4 1 2 x + 1 5 y = − 1 4 1 2 x − 3 5 y = − 9 4

For the following exercises, solve a system using the inverse of a 3 × 3 3 × 3 matrix.

3 x −2 y + 5 z = 21 5 x + 4 y = 37 x −2 y −5 z = 5 3 x −2 y + 5 z = 21 5 x + 4 y = 37 x −2 y −5 z = 5

4 x + 4 y + 4 z = 40 2 x − 3 y + 4 z = −12 − x + 3 y + 4 z = 9 4 x + 4 y + 4 z = 40 2 x − 3 y + 4 z = −12 − x + 3 y + 4 z = 9

6 x − 5 y − z = 31 − x + 2 y + z = −6 3 x + 3 y + 2 z = 13 6 x − 5 y − z = 31 − x + 2 y + z = −6 3 x + 3 y + 2 z = 13

6 x −5 y + 2 z = −4 2 x + 5 y − z = 12 2 x + 5 y + z = 12 6 x −5 y + 2 z = −4 2 x + 5 y − z = 12 2 x + 5 y + z = 12

4 x −2 y + 3 z = −12 2 x + 2 y −9 z = 33 6 y −4 z = 1 4 x −2 y + 3 z = −12 2 x + 2 y −9 z = 33 6 y −4 z = 1

1 10 x − 1 5 y + 4 z = −41 2 1 5 x −20 y + 2 5 z = −101 3 10 x + 4 y − 3 10 z = 23 1 10 x − 1 5 y + 4 z = −41 2 1 5 x −20 y + 2 5 z = −101 3 10 x + 4 y − 3 10 z = 23

1 2 x − 1 5 y + 1 5 z = 31 100 − 3 4 x − 1 4 y + 1 2 z = 7 40 − 4 5 x − 1 2 y + 3 2 z = 1 4 1 2 x − 1 5 y + 1 5 z = 31 100 − 3 4 x − 1 4 y + 1 2 z = 7 40 − 4 5 x − 1 2 y + 3 2 z = 1 4

0.1 x + 0.2 y + 0.3 z = −1.4 0.1 x −0.2 y + 0.3 z = 0.6 0.4 y + 0.9 z = −2 0.1 x + 0.2 y + 0.3 z = −1.4 0.1 x −0.2 y + 0.3 z = 0.6 0.4 y + 0.9 z = −2

For the following exercises, use a calculator to solve the system of equations with matrix inverses.

2 x − y = −3 − x + 2 y = 2.3 2 x − y = −3 − x + 2 y = 2.3

− 1 2 x − 3 2 y = − 43 20 5 2 x + 11 5 y = 31 4 − 1 2 x − 3 2 y = − 43 20 5 2 x + 11 5 y = 31 4

12.3 x −2 y −2.5 z = 2 36.9 x + 7 y −7.5 z = −7 8 y −5 z = −10 12.3 x −2 y −2.5 z = 2 36.9 x + 7 y −7.5 z = −7 8 y −5 z = −10

0.5 x −3 y + 6 z = −0.8 0.7 x −2 y = −0.06 0.5 x + 4 y + 5 z = 0 0.5 x −3 y + 6 z = −0.8 0.7 x −2 y = −0.06 0.5 x + 4 y + 5 z = 0

For the following exercises, find the inverse of the given matrix.

[ 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 1 ] [ 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 1 ]

[ − 1 0 2 5 0 0 0 2 0 2 − 1 0 1 − 3 0 1 ] [ − 1 0 2 5 0 0 0 2 0 2 − 1 0 1 − 3 0 1 ]

[ 1 − 2 3 0 0 1 0 2 1 4 − 2 3 − 5 0 1 1 ] [ 1 − 2 3 0 0 1 0 2 1 4 − 2 3 − 5 0 1 1 ]

[ 1 2 0 2 3 0 2 1 0 0 0 0 3 0 1 0 2 0 0 1 0 0 1 2 0 ] [ 1 2 0 2 3 0 2 1 0 0 0 0 3 0 1 0 2 0 0 1 0 0 1 2 0 ]

[ 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 ] [ 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 ]

Study Guides > Finite Math

Reading: solving a system of linear equations using the inverse of a matrix, solving a system of equations using the inverse of a matrix.

  • Solve the following system using the inverse of a matrix. 5 x + 15 y + 56 z = 35 −4 x − 11 y − 41 z = −26 − x −3 y − 11 z = −7
  • Solve the system using the inverse of the coefficient matrix. 2 x − 17 y + 11 z = 0 − x + 11 y − 7 z = 8 3 y − 2 z = −2
  • Write the equation AX = B [latex]\displaystyle{\left[\matrix{{5}&{15}&{56}\-{4}&-{11}&-{41}\-{1}&-{3}&-{11}}]}{\left[\matrix{{x}\{y}\{z}}]}={\left[\matrix{{35}\-{26}\-{7}}]}[/latex] First we will find the inverse of A by augmenting with the identity. [latex-display]\displaystyle{\left[\matrix{{5}&{15}&{56}&{\mid}&{1}&{0}&{0}\-{4}&-{11}&-{41}&{\mid}&{0}&{1}&{0}\-{1}&-{3}&-{11}&{\mid}&{0}&{0}&{1}}]}[/latex-display] Multiply row 1 by [latex-display]\displaystyle\frac{{1}}{{5}}[/latex-display] Multiply row 1 by 4 and add to row 2. [latex-display]\displaystyle{\left[\matrix{{1}&{3}&frac{{56}}{{5}}&{\mid}&frac{{1}}{{5}}&{0}&{0}\{0}&{1}&frac{{19}}{{5}}&{\mid}&frac{{4}}{{5}}&{1}&{0}\-{1}&-{3}&-{11}&{\mid}&{0}&{0}&{1}}]}[/latex-display] Add row 1 to row 3. [latex-display]\displaystyle{\left[\matrix{{1}&{3}&frac{{56}}{{5}}&{\mid}&frac{{1}}{{5}}&{0}&{0}\{0}&{1}&frac{{19}}{{5}}&{\mid}&frac{{4}}{{5}}&{1}&{0}\{0}&{0}&frac{{1}}{{5}}&{\mid}&frac{{1}}{{5}}&{0}&{1}}]}[/latex-display] Multiply row 2 by –3 and add to row 1. [latex-display]\displaystyle{\left[\matrix{{1}&{0}&-\frac{{1}}{{5}}&{\mid}&-\frac{{11}}{{5}}&-{3}&{0}\{0}&{1}&frac{{19}}{{5}}&{\mid}&frac{{4}}{{5}}&{1}&{0}\{0}&{0}&frac{{1}}{{5}}&{\mid}&frac{{1}}{{5}}&{0}&{1}}]}[/latex-display] Multiply row 3 by 5. [latex-display]\displaystyle{\left[\matrix{{1}&{0}&-\frac{{1}}{{5}}&{\mid}&-\frac{{11}}{{5}}&-{3}&{0}\{0}&{1}&frac{{19}}{{5}}&{\mid}&frac{{4}}{{5}}&{1}&{0}\{0}&{0}&{1}&{\mid}&{1}&{0}&{5}}]}[/latex-display] Multiply row 3 by [latex]\displaystyle\frac{{1}}{{5}}[/latex] Multiply row 3 by [latex]\displaystyle-\frac{{19}}{{5}}[/latex] So, [latex-display]\displaystyle{A}^{{-{{1}}}}={\left[\matrix{-{2}&-{3}&{1}\-{3}&{1}&-{19}\{1}&{0}&{5}}]}[/latex-display] Multiply both sides of the equation by A –1. We want A –1 AX = A –1 B : Thus, [latex-display]\displaystyle{A}^{{-{{1}}}}{B}={\left[\matrix{-{70}+{78}-{7}\-{105}-{26}+{133}\{35}+{0}-{35}}]}={\left[\matrix{{1}\{2}\{0}}]}[/latex-display] The solution is (1,2,0).
  • [latex]\displaystyle{X}={\left[\matrix{{4}\{38}\{58}}]}[/latex]
  • Save the coefficient matrix and the constant matrix as matrix variables [ A ] and [ B ].
  • Enter the multiplication into the calculator, calling up each matrix variable as needed.
  • If the coefficient matrix is invertible, the calculator will present the solution matrix; if the coefficient matrix is not invertible, the calculator will present an error message.

Key Equations

Key concepts.

  • An identity matrix has the property [latex]\displaystyle{A}{I}={I}{A}={A}[/latex].
  • An invertible matrix has the property [latex]\displaystyle{A}{A}^{{-{{1}}}}={A}^{{-{{1}}}}{A}={I}[/latex].
  • Use matrix multiplication and the identity to find the inverse of a 2 × 2 matrix.
  • The multiplicative inverse can be found using a formula.
  • Another method of finding the inverse is by augmenting with the identity.
  • We can augment a 3 × 3 matrix with the identity on the right and use row operations to turn the original matrix into the identity, and the matrix on the right becomes the inverse.
  • Write the system of equations as [latex]\displaystyle{A}{X}={B}[/latex].
  • We can also use a calculator to solve a system of equations with matrix inverses.

Please add a message.

Message received. Thanks for the feedback.

how to solve equations using inverse matrix

Inverse Matrix Method Calculator

Here you can solve systems of simultaneous linear equations using Inverse Matrix Method Calculator with complex numbers online for free. All the auxiliary methods used in calculation can be calculated apart with more details.

Have questions? Read the instructions .

About the method

To solve a system of linear equations using inverse matrix method you need to do the following steps.

  • Set the main matrix and calculate its inverse (in case it is not singular).
  • Multiply the inverse matrix by the solution vector.
  • The result vector is a solution of the matrix equation.

To understand inverse matrix method better input any example and examine the solution.

Module 14: Solve Systems With Matrices

Solving a system using an inverse, learning outcomes.

  • Solve a 2×2 system using an inverse.
  • Solve a 3×3 systems using an inverse.
  • Solve a system with a calculator.

Solving a system of linear equations using the inverse of a matrix requires the definition of two new matrices: [latex]X[/latex] is the matrix representing the variables of the system, and [latex]B[/latex] is the matrix representing the constants. Using matrix multiplication , we may define a system of equations with the same number of equations as variables as [latex]AX=B[/latex]

To solve a system of linear equations using an inverse matrix , let [latex]A[/latex] be the coefficient matrix , let [latex]X[/latex] be the variable matrix, and let [latex]B[/latex] be the constant matrix. Thus, we want to solve a system [latex]AX=B[/latex]. For example, look at the following system of equations.

[latex]\begin{array}{c}{a}_{1}x+{b}_{1}y={c}_{1}\\ {a}_{2}x+{b}_{2}y={c}_{2}\end{array}[/latex]

From this system, the coefficient matrix is

[latex]A=\left[\begin{array}{cc}{a}_{1}& {b}_{1}\\ {a}_{2}& {b}_{2}\end{array}\right][/latex]

The variable matrix is

[latex]X=\left[\begin{array}{c}x\\ y\end{array}\right][/latex]

And the constant matrix is

[latex]B=\left[\begin{array}{c}{c}_{1}\\ {c}_{2}\end{array}\right][/latex]

Then [latex]AX=B[/latex] looks like

[latex]\left[\begin{array}{cc}{a}_{1}& {b}_{1}\\ {a}_{2}& {b}_{2}\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{c}{c}_{1}\\ {c}_{2}\end{array}\right][/latex]

Recall the discussion earlier in this section regarding multiplying a real number by its inverse, [latex]\left({2}^{-1}\right)2=\left(\frac{1}{2}\right)2=1[/latex]. To solve a single linear equation [latex]ax=b[/latex] for [latex]x[/latex], we would simply multiply both sides of the equation by the multiplicative inverse (reciprocal) of [latex]a[/latex]. Thus,

[latex]\begin{array}{c}\text{ }ax=b\\ \text{ }\left(\frac{1}{a}\right)ax=\left(\frac{1}{a}\right)b\\ \left({a}^{-1}\text{ }\right)ax=\left({a}^{-1}\right)b\\ \left[\left({a}^{-1}\right)a\right]x=\left({a}^{-1}\right)b\\ \text{ }1x=\left({a}^{-1}\right)b\\ \text{ }x=\left({a}^{-1}\right)b\end{array}[/latex]

The only difference between solving a linear equation and a system of equations written in matrix form is that finding the inverse of a matrix is more complicated, and matrix multiplication is a longer process. However, the goal is the same—to isolate the variable.

We will investigate this idea in detail, but it is helpful to begin with a [latex]2\times 2[/latex] system and then move on to a [latex]3\times 3[/latex] system.

A General Note: Solving a System of Equations Using the Inverse of a Matrix

Given a system of equations, write the coefficient matrix [latex]A[/latex], the variable matrix [latex]X[/latex], and the constant matrix [latex]B[/latex]. Then [latex]AX=B[/latex]. Multiply both sides by the inverse of [latex]A[/latex] to obtain the solution.

[latex]\begin{array}{r}\hfill \left({A}^{-1}\right)AX=\left({A}^{-1}\right)B\\ \hfill \left[\left({A}^{-1}\right)A\right]X=\left({A}^{-1}\right)B\\ \hfill IX=\left({A}^{-1}\right)B\\ \hfill X=\left({A}^{-1}\right)B\end{array}[/latex]

If the coefficient matrix does not have an inverse, does that mean the system has no solution?

No, if the coefficient matrix is not invertible, the system could be inconsistent and have no solution or be dependent and have infinitely many solutions.

Example: Solving a 2 × 2 System Using the Inverse of a Matrix

Solve the given system of equations using the inverse of a matrix.

[latex]\begin{array}{r}\hfill 3x+8y=5\\ \hfill 4x+11y=7\end{array}[/latex]

Write the system in terms of a coefficient matrix, a variable matrix, and a constant matrix.

[latex]A=\left[\begin{array}{cc}3& 8\\ 4& 11\end{array}\right],X=\left[\begin{array}{c}x\\ y\end{array}\right],B=\left[\begin{array}{c}5\\ 7\end{array}\right][/latex]

[latex]\left[\begin{array}{cc}3& 8\\ 4& 11\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{c}5\\ 7\end{array}\right][/latex]

First, we need to calculate [latex]{A}^{-1}[/latex]. Using the formula to calculate the inverse of a 2 by 2 matrix, we have:

[latex]\begin{array}{l}{A}^{-1} & =\frac{1}{ad-bc}\left[\begin{array}{cc}d& -b\\ -c& a\end{array}\right]\hfill \\ & =\frac{1}{3\left(11\right)-8\left(4\right)}\left[\begin{array}{cc}11& -8\\ -4& 3\end{array}\right]\hfill \\ & =\frac{1}{1}\left[\begin{array}{cc}11& -8\\ -4& 3\end{array}\right]\hfill \end{array}[/latex]

[latex]{A}^{-1}=\left[\begin{array}{cc}11& -8\\ -4& \text{ }\text{ }3\end{array}\right][/latex]

Now we are ready to solve. Multiply both sides of the equation by [latex]{A}^{-1}[/latex].

[latex]\begin{array}{l}\left({A}^{-1}\right)AX=\left({A}^{-1}\right)B\hfill \\ \left[\begin{array}{rr}\hfill 11& \hfill -8\\ \hfill -4& \hfill 3\end{array}\right]\text{ }\left[\begin{array}{cc}3& 8\\ 4& 11\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{rr}\hfill 11& \hfill -8\\ \hfill -4& \hfill 3\end{array}\right]\text{ }\left[\begin{array}{c}5\\ 7\end{array}\right]\hfill \\ \left[\begin{array}{cc}1& 0\\ 0& 1\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{r}\hfill 11\left(5\right)+\left(-8\right)7\\ \hfill -4\left(5\right)+3\left(7\right)\end{array}\right]\hfill \\ \left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{r}\hfill -1\\ \hfill 1\end{array}\right]\hfill \end{array}[/latex]

The solution is [latex]\left(-1,1\right)[/latex].

Can we solve for [latex]X[/latex] by finding the product [latex]B{A}^{-1}?[/latex]

No, recall that matrix multiplication is not commutative, so [latex]{A}^{-1}B\ne B{A}^{-1}[/latex]. Consider our steps for solving the matrix equation.

Notice in the first step we multiplied both sides of the equation by [latex]{A}^{-1}[/latex], but the [latex]{A}^{-1}[/latex] was to the left of [latex]A[/latex] on the left side and to the left of [latex]B[/latex] on the right side. Because matrix multiplication is not commutative, order matters.

Example: Solving a 3 × 3 System Using the Inverse of a Matrix

Solve the following system using the inverse of a matrix.

[latex]\begin{array}{r}\hfill 5x+15y+56z=35\\ \hfill -4x - 11y - 41z=-26\\ \hfill -x - 3y - 11z=-7\end{array}[/latex]

Write the equation [latex]AX=B[/latex].

[latex]\left[\begin{array}{ccc}5& 15& 56\\ -4& -11& -41\\ -1& -3& -11\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\\ z\end{array}\right]=\left[\begin{array}{r}\hfill 35\\ \hfill -26\\ \hfill -7\end{array}\right][/latex]

First, we will find the inverse of [latex]A[/latex] by augmenting with the identity.

[latex]\left[\begin{array}{rrr}\hfill 5& \hfill 15& \hfill 56\\ \hfill -4& \hfill -11& \hfill -41\\ \hfill -1& \hfill -3& \hfill -11\end{array}|\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right][/latex]

Multiply row 1 by [latex]\frac{1}{5}[/latex].

[latex]\left[\begin{array}{ccc}1& 3& \frac{56}{5}\\ -4& -11& -41\\ -1& -3& -11\end{array}|\begin{array}{ccc}\frac{1}{5}& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right][/latex]

Multiply row 1 by 4 and add to row 2.

[latex]\left[\begin{array}{ccc}1& 3& \frac{56}{5}\\ 0& 1& \frac{19}{5}\\ -1& -3& -11\end{array}|\begin{array}{ccc}\frac{1}{5}& 0& 0\\ \frac{4}{5}& 1& 0\\ 0& 0& 1\end{array}\right][/latex]

Add row 1 to row 3.

[latex]\left[\begin{array}{ccc}1& 3& \frac{56}{5}\\ 0& 1& \frac{19}{5}\\ 0& 0& \frac{1}{5}\end{array}|\begin{array}{ccc}\frac{1}{5}& 0& 0\\ \frac{4}{5}& 1& 0\\ \frac{1}{5}& 0& 1\end{array}\right][/latex]

Multiply row 2 by −3 and add to row 1.

[latex]\left[\begin{array}{ccc}1& 0& -\frac{1}{5}\\ 0& 1& \frac{19}{5}\\ 0& 0& \frac{1}{5}\end{array}|\begin{array}{ccc}-\frac{11}{5}& -3& 0\\ \frac{4}{5}& 1& 0\\ \frac{1}{5}& 0& 1\end{array}\right][/latex]

Multiply row 3 by 5.

[latex]\left[\begin{array}{ccc}1& 0& -\frac{1}{5}\\ 0& 1& \frac{19}{5}\\ 0& 0& 1\end{array}|\begin{array}{ccc}-\frac{11}{5}& -3& 0\\ \frac{4}{5}& 1& 0\\ 1& 0& 5\end{array}\right][/latex]

Multiply row 3 by [latex]\frac{1}{5}[/latex] and add to row 1.

[latex]\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& \frac{19}{5}\\ 0& 0& 1\end{array}|\begin{array}{ccc}-2& -3& 1\\ \frac{4}{5}& 1& 0\\ 1& 0& 5\end{array}\right][/latex]

Multiply row 3 by [latex]-\frac{19}{5}[/latex] and add to row 2.

[latex]\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}|\begin{array}{ccc}-2& -3& 1\\ -3& 1& -19\\ 1& 0& 5\end{array}\right][/latex]

[latex]{A}^{-1}=\left[\begin{array}{ccc}-2& -3& 1\\ -3& 1& -19\\ 1& 0& 5\end{array}\right][/latex]

Multiply both sides of the equation by [latex]{A}^{-1}[/latex]. We want

[latex]{A}^{-1}AX={A}^{-1}B:[/latex]

[latex]\left[\begin{array}{rrr}\hfill -2& \hfill -3& \hfill 1\\ \hfill -3& \hfill 1& \hfill -19\\ \hfill 1& \hfill 0& \hfill 5\end{array}\right]\text{ }\left[\begin{array}{rrr}\hfill 5& \hfill 15& \hfill 56\\ \hfill -4& \hfill -11& \hfill -41\\ \hfill -1& \hfill -3& \hfill -11\end{array}\right]\text{ }\left[\begin{array}{c}x\\ y\\ z\end{array}\right]=\left[\begin{array}{rrr}\hfill -2& \hfill -3& \hfill 1\\ \hfill -3& \hfill 1& \hfill -19\\ \hfill 1& \hfill 0& \hfill 5\end{array}\right]\text{ }\left[\begin{array}{r}\hfill 35\\ \hfill -26\\ \hfill -7\end{array}\right][/latex]

[latex]{A}^{-1}B=\left[\begin{array}{r}\hfill -70+78 - 7\\ \hfill -105 - 26+133\\ \hfill 35+0 - 35\end{array}\right]=\left[\begin{array}{c}1\\ 2\\ 0\end{array}\right][/latex]

The solution is [latex]\left(1,2,0\right)[/latex].

Solve the system using the inverse of the coefficient matrix.

[latex]\begin{array}{l}\text{ }2x - 17y+11z=0\hfill \\ \text{ }-x+11y - 7z=8\hfill \\ \text{ }3y - 2z=-2\hfill \end{array}[/latex]

[latex]X=\left[\begin{array}{c}4\\ 38\\ 58\end{array}\right][/latex]

How To: Given a system of equations, solve with matrix inverses using a calculator

  • Save the coefficient matrix and the constant matrix as matrix variables [latex]\left[A\right][/latex] and [latex]\left[B\right][/latex].
  • Enter the multiplication into the calculator, calling up each matrix variable as needed.
  • If the coefficient matrix is invertible, the calculator will present the solution matrix; if the coefficient matrix is not invertible, the calculator will present an error message.

Example: Using a Calculator to Solve a System of Equations with Matrix Inverses

Solve the system of equations with matrix inverses using a calculator

[latex]\begin{array}{l}2x+3y+z=32\hfill \\ 3x+3y+z=-27\hfill \\ 2x+4y+z=-2\hfill \end{array}[/latex]

On the matrix page of the calculator, enter the coefficient matrix as the matrix variable [latex]\left[A\right][/latex], and enter the constant matrix as the matrix variable [latex]\left[B\right][/latex].

[latex]\left[A\right]=\left[\begin{array}{ccc}2& 3& 1\\ 3& 3& 1\\ 2& 4& 1\end{array}\right],\text{ }\left[B\right]=\left[\begin{array}{c}32\\ -27\\ -2\end{array}\right][/latex]

On the home screen of the calculator, type in the multiplication to solve for [latex]X[/latex], calling up each matrix variable as needed.

[latex]{\left[A\right]}^{-1}\times \left[B\right][/latex]

Evaluate the expression.

[latex]\left[\begin{array}{c}-59\\ -34\\ 252\end{array}\right][/latex]

Contribute!

Improve this page Learn More

  • Revision and Adaptation. Provided by : Lumen Learning. License : CC BY: Attribution
  • College Algebra. Authored by : Abramson, Jay et al.. Provided by : OpenStax. Located at : http://cnx.org/contents/[email protected] . License : CC BY: Attribution . License Terms : Download for free at http://cnx.org/contents/[email protected]
  • Precalculus. Authored by : OpenStax College. Provided by : OpenStax. Located at : http://cnx.org/contents/[email protected]:1/Preface . License : CC BY: Attribution

Footer Logo Lumen Waymaker

Inverse of a Matrix

Please read our Introduction to Matrices first.

What is the Inverse of a Matrix?

Just like a number has a reciprocal ...

And there are other similarities:

When we multiply a number by its reciprocal we get 1 :

When we multiply a matrix by its inverse we get the Identity Matrix (which is like "1" for matrices):

Same thing when the inverse comes first:

Identity Matrix

We just mentioned the "Identity Matrix". It is the matrix equivalent of the number "1":

A 3x3 Identity Matrix

  • It is "square" (has same number of rows as columns),
  • It has 1 s on the diagonal and 0 s everywhere else.
  • Its symbol is the capital letter I .

The Identity Matrix can be 2×2 in size, or 3×3, 4×4, etc ...

Here is the definition:

The inverse of A is A -1 only when:

AA -1 = A -1 A = I

Sometimes there is no inverse at all.

(Note: writing AA -1 means A times A -1 )

OK, how do we calculate the inverse?

Well, for a 2x2 matrix the inverse is:

In other words: swap the positions of a and d, put negatives in front of b and c, and divide everything by ad−bc .

Note: ad−bc is called the determinant .

Let us try an example:

How do we know this is the right answer?

Remember it must be true that: AA -1 = I

So, let us check to see what happens when we multiply the matrix by its inverse:

And, hey!, we end up with the Identity Matrix! So it must be right.

It should also be true that: A -1 A = I

Why don't you have a go at multiplying these? See if you also get the Identity Matrix:

Why Do We Need an Inverse?

Because with matrices we don't divide ! Seriously, there is no concept of dividing by a matrix.

But we can multiply by an inverse , which achieves the same thing.

Imagine we can't divide by numbers ...

... and someone asks "How do I share 10 apples with 2 people?"

But we can take the reciprocal of 2 (which is 0.5), so we answer:

10 × 0.5 = 5

They get 5 apples each.

The same thing can be done with matrices:

Say we want to find matrix X, and we know matrix A and B:

It would be nice to divide both sides by A (to get X=B/A), but remember we can't divide .

But what if we multiply both sides by A -1 ?

XAA -1 = BA -1

And we know that AA -1 = I, so:

We can remove I (for the same reason we can remove "1" from 1x = ab for numbers):

And we have our answer (assuming we can calculate A -1 )

In that example we were very careful to get the multiplications correct, because with matrices the order of multiplication matters. AB is almost never equal to BA.

A Real Life Example: Bus and Train

how to solve equations using inverse matrix

A group took a trip on a bus , at $3 per child and $3.20 per adult for a total of $118.40.

They took the train back at $3.50 per child and $3.60 per adult for a total of $135.20.

How many children, and how many adults?

First, let us set up the matrices (be careful to get the rows and columns correct!):

This is just like the example above:

So to solve it we need the inverse of "A":

Now we have the inverse we can solve using:

There were 16 children and 22 adults!

The answer almost appears like magic. But it is based on good mathematics.

Calculations like that (but using much larger matrices) help Engineers design buildings, are used in video games and computer animations to make things look 3-dimensional, and many other places.

It is also a way to solve Systems of Linear Equations .

The calculations are done by computer, but the people must understand the formulas.

Order is Important

Say that we are trying to find "X" in this case:

This is different to the example above! X is now after A.

With matrices the order of multiplication usually changes the answer. Do not assume that AB = BA, it is almost never true.

So how do we solve this one? Using the same method, but put A -1 in front:

A -1 AX = A -1 B

And we know that A -1 A= I, so:

IX = A -1 B

We can remove I:

Why don't we try our bus and train example, but with the data set up that way around.

It can be done that way, but we must be careful how we set it up.

This is what it looks like as AX = B :

It looks so neat! I think I prefer it like this.

Also note how the rows and columns are swapped over ("Transposed") compared to the previous example.

To solve it we need the inverse of "A":

It is like the inverse we got before, but Transposed (rows and columns swapped over).

Now we can solve using:

Same answer: 16 children and 22 adults.

So matrices are powerful things, but they do need to be set up correctly!

The Inverse May Not Exist

First of all, to have an inverse the matrix must be "square" (same number of rows and columns).

But also the determinant cannot be zero (or we end up dividing by zero). How about this:

24−24? That equals 0, and 1/0 is undefined . We cannot go any further! This matrix has no Inverse.

Such a matrix is called "Singular", which only happens when the determinant is zero.

And it makes sense ... look at the numbers: the second row is just double the first row, and does not add any new information .

And the determinant 24−24 lets us know this fact.

(Imagine in our bus and train example that the prices on the train were all exactly 50% higher than the bus: so now we can't figure out any differences between adults and children. There needs to be something to set them apart.)

Bigger Matrices

The inverse of a 2x2 is easy ... compared to larger matrices (such as a 3x3, 4x4, etc).

For those larger matrices there are three main methods to work out the inverse:

  • Inverse of a Matrix using Elementary Row Operations (Gauss-Jordan)
  • Inverse of a Matrix using Minors, Cofactors and Adjugate
  • Use a computer (such as the Matrix Calculator )
  • The inverse of A is A -1 only when AA -1 = A -1 A = I
  • To find the inverse of a 2x2 matrix: swap the positions of a and d, put negatives in front of b and c, and divide everything by the determinant (ad-bc).
  • Sometimes there is no inverse at all

Inverse of Matrix

The inverse of Matrix for a matrix A is denoted by A -1 . The inverse of a 2 × 2 matrix can be calculated using a simple formula. Further, to find the inverse of a matrix of order 3 or higher, we need to know about the determinant and adjoint of the matrix. The inverse of a matrix is another matrix, which by multiplying with the given matrix gives the identity matrix.

The inverse of matrix is used of find the solution of linear equations through the matrix inversion method. Here, let us learn about the formula, methods, and terms related to the inverse of matrix.

What is Inverse of Matrix?

The inverse of matrix is a matrix, which on multiplication with the given matrix gives the multiplicative identity . For a square matrix A, its inverse is A -1 , and A · A -1 = A -1 · A = I, where I is the identity matrix. The matrix whose determinant is non-zero and for which the inverse matrix can be calculated is called an invertible matrix. For example, the inverse of A = \(\left[\begin{array}{rr} 1 & -1 \\ \\ 0 & 2 \end{array}\right]\) is \(\left[\begin{array}{cc} 1 & 1 / 2 \\ \\ 0 & 1 / 2 \end{array}\right]\) as

  • A · A -1 = \(\left[\begin{array}{rr} 1 & -1 \\ \\ 0 & 2 \end{array}\right]\) \(\left[\begin{array}{cc} 1 & 1 / 2 \\ \\ 0 & 1 / 2 \end{array}\right]\) = \(\left[\begin{array}{cc} 1 & 0 \\ \\ 0 & 1 \end{array}\right]\) = I
  • A -1 · A = \(\left[\begin{array}{cc} 1 & 1 / 2 \\ \\ 0 & 1 / 2 \end{array}\right]\) \(\left[\begin{array}{rr} 1 & -1 \\ \\ 0 & 2 \end{array}\right]\) = \(\left[\begin{array}{cc} 1 & 0 \\ \\ 0 & 1 \end{array}\right]\) = I

But how to find the inverse of a matrix? Let us see in the upcoming sections.

Inverse Matrix Formula

In the case of real numbers , the inverse of any real number a was the number a -1 , such that a times a -1 equals 1. We knew that for a real number, the inverse of the number was the reciprocal of the number, as long as the number wasn't zero. The inverse of a square matrix A, denoted by A -1 , is the matrix so that the product of A and A -1 is the identity matrix . The identity matrix that results will be the same size as matrix A.

The formula to find the inverse of a matrix is: A -1 = 1/|A| · Adj A, where

  • |A| is the determinant of A and
  • Adj A is the adjoint of A

Inverse of a Matrix is a inverse equals 1 over det a all times adjoint A

Since |A| is in the denominator of the above formula, the inverse of a matrix exists only if the determinant of the matrix is a non-zero value. i.e., |A| ≠ 0.

How to Find Matrix Inverse?

To find the inverse of a square matrix A, we use the following formula: A -1 = adj(A) / |A| ; |A| ≠ 0

  • A is a square matrix.
  • adj(A) is the adjoint matrix of A.
  • |A| is the determinant of A.

☛ Note: For a matrix to have its inverse exists:

  • The given matrix should be a square matrix.
  • The determinant of the matrix should not be equal to zero.

Terms Related to Matrix Inverse

The following terms below are helpful for more clear understanding and easy calculation of the inverse of matrix.

Minor: The minor is defined for every element of a matrix . The minor of a particular element is the determinant obtained after eliminating the row and column containing this element. For a matrix A = \(\begin{pmatrix} a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{pmatrix}\), the minor of the element \(a_{11}\) is:

Minor of \(a_{11}\) = \(\left|\begin{matrix}a_{22}&a_{23}\\a_{32}&a_{33}\end{matrix}\right|\)

Cofactor: The cofactor of an element is calculated by multiplying the minor with -1 to the exponent of the sum of the row and column elements in order representation of that element.

Cofactor of \(a_{ij}\) = (-1) i + j × minor of \(a_{ij}\).

Determinant: The determinant of a matrix is the single unique value representation of a matrix. The determinant of the matrix can be calculated with reference to any row or column of the given matrix. The determinant of the matrix is equal to the summation of the product of the elements and its cofactors, of a particular row or column of the matrix.

Singular Matrix: A matrix having a determinant value of zero is referred to as a singular matrix . For a singular matrix A, |A| = 0. The inverse of a singular matrix does not exist.

Non-Singular Matrix: A matrix whose determinant value is not equal to zero is referred to as a non-singular matrix . For a non-singular matrix |A| ≠ 0 and hence its inverse exists.

Adjoint of Matrix: The adjoint of a matrix is the transpose of the cofactor element matrix of the given matrix.

Rules For Row and Column Operations of a Determinant:

The following rules are helpful to perform the row and column operations on determinants .

  • The value of the determinant remains unchanged if the rows and columns are interchanged.
  • The sign of the determinant changes, if any two rows or (two columns) are interchanged.
  • If any two rows or columns of a matrix are equal, then the value of the determinant is zero.
  • If every element of a particular row or column is multiplied by a constant , then the value of the determinant also gets multiplied by the constant.
  • If the elements of a row or a column are expressed as a sum of elements, then the determinant can be expressed as a sum of determinants.
  • If the elements of a row or column are added or subtracted with the corresponding multiples of elements of another row or column, then the value of the determinant remains unchanged.

Methods to Find Inverse of Matrix

The inverse of a matrix can be found using two methods. The inverse of a matrix can be calculated through elementary operations and through the use of an adjoint of a matrix. The elementary operations on a matrix can be performed through row or column transformations. Also, the inverse of a matrix can be calculated by applying the inverse of matrix formula through the use of the determinant and the adjoint of the matrix. For performing the inverse of the matrix through elementary column operations we use the matrix X and the second matrix B on the right-hand side of the equation.

  • Elementary row or column operations
  • Inverse of matrix formula (using the adjoint and determinant of matrix)

Let us check each of the methods described below.

Elementary Row Operations

To calculate the inverse of matrix A using elementary row transformations, we first take the augmented matrix [A | I], where I is the identity matrix whose order is the same as A. Then we apply the row operations to convert the left side A into I. Then the matrix gets converted into [I | A -1 ]. For a more detailed process, click here .

Elementary Column Operations

We can apply the column operations as well just like how the process was explained for row operations to find the inverse of matrix.

Inverse of Matrix Formula

The inverse of matrix A can be computed using the inverse of matrix formula, A -1 = (adj A)/(det A). i.e., by dividing the adjoint of a matrix by the determinant of the matrix. The inverse of a matrix can be calculated by following the given steps:

  • Step 1: Calculate the minors of all elements of A.
  • Step 2: Then compute the cofactors of all elements and write the cofactor matrix by replacing the elements of A by their corresponding cofactors.
  • Step 3: Find the adjoint of A (written as adj A) by taking the transpose of the cofactor matrix of A.
  • Step 4: Multiply adj A by the reciprocal of the determinant.

For a matrix A, its inverse A -1 = \(\dfrac{1}{|A|}\) · Adj A

If A = \(\begin{pmatrix} a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{pmatrix}\), then

  • |A| = \(a_{11}(-1)^{1 + 1} \left|\begin{matrix}a_{22}&a_{23}\\a_{32}&a_{33}\end{matrix}\right| + a_{12}(-1)^{1 + 2} \left|\begin{matrix}a_{21}&a_{23}\\a_{31}&a_{33}\end{matrix}\right| + a_{13}(-1)^{1 + 3} \left|\begin{matrix}a_{21}&a_{22}\\a_{31}&a_{32}\end{matrix}\right|\)
  • Adj A = Transpose of Cofactor Matrix = Transpose of \(\begin{pmatrix} A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&A_{33}\end{pmatrix}\) =\(\begin{pmatrix} A_{11}&A_{21}&A_{31}\\A_{12}&A_{22}&A_{32}\\A_{13}&A_{23}&A_{33}\end{pmatrix}\)

A -1 = \(\dfrac{1}{|A|}.\begin{pmatrix} A_{11}&A_{21}&A_{31}\\A_{12}&A_{22}&A_{32}\\A_{13}&A_{23}&A_{33}\end{pmatrix}\)

In this section, we have learned the different methods to calculate the inverse of a matrix. Let us understand it better using a few examples for the different orders of matrices in the " examples " section below.

Inverse of 2 x 2 Matrix

The inverse of 2 × 2 matrix is easier to calculate in comparison to matrices of higher order. We can calculate the inverse of 2 × 2 matrix using the general steps to calculate the inverse of a matrix. Let us find the inverse of the 2 × 2 matrix given below: A = \(\begin{bmatrix} a & b \\ \\ c & d \end{bmatrix}\) A -1 = (1/|A|) × Adj A = [1/(ad - bc)] × \(\begin{bmatrix} d & -b \\ \\ -c & a \end{bmatrix}\)

matrix inverse of 2 by 2 matrix is A inverse equals 1 over a d minus b c all times matrix with elements d minus b minus c a.

Therefore, in order to calculate the inverse of 2 × 2 matrix, we need to first swap the positions of terms a and d and put negative signs for terms b and c, and finally divide it by the determinant of the matrix.

Inverse of 3 x 3 Matrix

We know that for every non-singular square matrix A, there exists an inverse matrix A -1 , such that A × A -1 = I. Let us take any 3 × 3 square matrix given as,

A = \(\begin{bmatrix} a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{bmatrix}\)

The inverse of 3x3 matrix can be calculated using the inverse matrix formula, A -1 = (1/|A|) × Adj A

We will first check if the given matrix is invertible, i.e., |A| ≠ 0. If the inverse of a matrix exists, we can find the adjoint of the given matrix and divide it by the determinant of the matrix.

A similar method can be followed to find the inverse of any n × n matrix. Let us see if similar steps can be used to calculate the inverse of m × n matrix where m ≠ n.

Inverse of 2 × 3 Matrix

We know that the first condition for the inverse of a matrix to exist is that the given matrix should be a square matrix. Also, the determinant of this square matrix should be non-zero. This means that the inverse of matrices of the order m × n will not exist where m ≠ n. Therefore, we cannot calculate the inverse of 2 × 3 matrix.

Inverse of 2 × 1 Matrix

Similar to the inverse of 2 × 3 matrix, the inverse of 2 × 1 matrix also does not exist because the given matrix is not a square matrix.

Determinant of Inverse Matrix

The determinant of the inverse of an invertible matrix is the inverse of the determinant of the original matrix. i.e., det(A -1 ) = 1 / det(A). Let us check the proof of the above statement.

We know that, det(A • B) = det (A) × det(B)

Also, A × A -1 = I

det(A × A -1 ) = det(I)

or, det(A) × det(A -1 ) = det(I)

Since, det(I) = 1

det(A) × det(A -1 ) = 1

or, det(A -1 ) = 1 / det(A)

Hence, proved.

☛ Related Articles:

  • Inverse Matrix Calculator
  • Matrix Multiplication Calculator
  • Determinant Calculator

Important Points on Inverse of a Matrix:

  • The inverse of a square matrix (if exists) is unique.
  • If A and B are two invertible matrices of the same order then (AB) -1 = B -1 A -1 .
  • The inverse of a square matrix A exists, only if its determinant is a non-zero value, |A| ≠ 0.
  • The determinant of matrix inverse is equal to the reciprocal of the determinant of the original matrix.
  • The determinant of the product of two matrices is equal to the product of the determinants of the two individual matrices. |AB| = |A|.|B|

Cuemath is one of the world's leading math learning platforms that offers LIVE 1-to-1 online math classes for grades K-12 . Our mission is to transform the way children learn math, to help them excel in school and competitive exams. Our expert tutors conduct 2 or more live classes per week, at a pace that matches the child's learning needs.

Inverse of Matrix Examples

Example 1: Find the inverse of matrix A = \(\left(\begin{matrix}-3 & 4\\ \\ 2 & 5 \end{matrix}\right)\).

The given matrix is A = \(\left(\begin{matrix}-3 & 4\\ \\2 & 5 \end{matrix}\right)\).

The formula to calculate the matrix inverse of A = \(\left(\begin{matrix}a&b\\\\c&d\end{matrix}\right)\) is A -1 = \(\dfrac{1}{ad - bc}\left(\begin{matrix}d&-b\\\\-c&a\end{matrix}\right)\).

Using this formula we can calculate A -1 as follows.

A -1 = \(\dfrac{1}{(-3)× 5 - 4 × 2}\left(\begin{matrix}5&-4\\\\-2&-3\end{matrix}\right)\)

= \(\dfrac{1}{-15 - 8}\left(\begin{matrix}5&-4\\\\-2&-3\end{matrix}\right)\)

= \(\dfrac{-1}{23}\left(\begin{matrix}5&-4\\\\-2&-3\end{matrix}\right)\)

Answer: Therefore A -1 = \(\dfrac{-1}{23}\left(\begin{matrix}5&-4\\\\-2&-3\end{matrix}\right)\)

Example 2: Find the matrix inverse of the matrix A = \(\left(\begin{matrix}4 & -2 & 1\\5&0&3\\-1&2 & 6\end{matrix}\right)\).

The given matrix is A = \(\left(\begin{matrix}4 & -2 & 1\\5&0&3\\-1&2 & 6\end{matrix}\right)\)

Step - 1: Let us find the determinant of the given matrix using Row - 1 of the above matrix.

|A| = \(4\left|\begin{matrix}0&3\\2 & 6\end{matrix}\right| -(-2)\left|\begin{matrix}5&3\\-1 & 6\end{matrix}\right|+1\left|\begin{matrix}5&0\\-1& 2\end{matrix}\right|\)

= 4(0 × 6 - 3 × 2) + 2(5 × 6 - (-1) × 3) +1(5 × 2 - 0 × (-1))

= 4(0 - 6) + 2(30 + 3) + 1(10 - 0)

= -24 + 66 + 10

Now, we will determine the adjoint of the matrix A by calculating the cofactors of each element and then taking the transpose of the cofactor matrix.

Adj A = \(\left(\begin{matrix}-6 & 14 & -6\\-33&25&-7\\10&-6 & 10\end{matrix}\right)\)

The inverse of matrix A is given by the formula A -1 = \(\dfrac{1}{|A|}\).Adj A

A -1 = \(\dfrac{1}{52}\).\(\left(\begin{matrix}-6 & 14 & -6\\-33&25&-7\\10&-6 & 10\end{matrix}\right)\)

= \(\left(\begin{matrix}-3/26 & 7/26 & -3/26\\-33/52&25/52&-7/52\\5/26&-3/26 & 5/26\end{matrix}\right)\)

Answer: A -1 = \(\left(\begin{matrix}-3/26 & 7/26 & -3/26\\-33/52&25/52&-7/52\\5/26&-3/26 & 5/26\end{matrix}\right)\)

Example 3: Find the inverse of \(\begin{bmatrix} 4 & 2 \\\\ -1 & 5 \end{bmatrix}\).

To find: Inverse of matrix \(\begin{bmatrix} 4 & 2 \\\\ -1 & 5 \end{bmatrix}\)

Using the matrix inverse formula,

\( A^{-1} = \dfrac{\text{adj(A)}}{\text{|A|}}\)

\( A^{-1} = \dfrac{1}{det \begin{pmatrix}4 & 2 \\\\ -1 & 5 \end{pmatrix}} \begin{pmatrix}5 & -2 \\\\ 1 & 4 \end{pmatrix}\)

Since, det \(\begin{pmatrix}4 & 2 \\\\ -1 & 5 \end{pmatrix}\) = 22

\( A^{-1} = \dfrac{1}{22} \begin{pmatrix}5 & -2 \\\\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 5/22 & -2/22 \\\\ 1/22 & 4/22 \end{pmatrix} \)

Answer: Inverse of the given matrix \( = \begin{bmatrix} 5/22 & -1/11 \\\\ 1/22 & 2/11 \end{bmatrix}\)

go to slide go to slide go to slide

how to solve equations using inverse matrix

Book a Free Trial Class

Practice Questions on Inverse of Matrix

go to slide go to slide

FAQs on Inverse of Matrix

What is the meaning of inverse of matrix.

The inverse of a matrix is another matrix , which multiplies with the given matrix and gives the multiplicative identity. For a matrix A, its inverse is A -1 , and A · A -1 = I. The general formula for the inverse of matrix is equal to the adjoint of a matrix divided by the determinant of a matrix. i.e., A -1 = 1/|A| · Adj A. The inverse of a matrix exists only if the determinant of the matrix is a non-zero value.

What is the Formula for An Inverse Matrix?

The inverse matrix formula is used to determine the inverse matrix for any given matrix. The inverse of a square matrix, A is A -1 only when: A × A -1 = A -1 × A = I . The inverse matrix formula can be given as, A -1 = adj(A)/|A|; |A| ≠ 0, where A is a square matrix.

How to Calculate Inverse of Matrix?

The inverse of a square matrix is calculated in 2 simple steps.

  • Step 1: First, the determinant and the adjoint of the given square matrix are calculated.
  • Step 2: The inverse of the matrix A is equal to \(\dfrac{1}{|A|}\).Adj A.

How to Find Inverse of a 2 × 2 Matrix?

The inverse of a 2 × 2 matrix is equal to the adjoint of the matrix divided by the determinant of the matrix. For a matrix A = \(\left(\begin{matrix}a&b\\ \\c&d\end{matrix}\right)\), its adjoint is equal to the interchange of the elements of the first diagonal and the sign change of the elements of the second diagonal. The formula for the inverse of the matrix is as follows.

A -1 = \(\dfrac{1}{ad - bc}\left(\begin{matrix}d&-b\\\\-c&a\end{matrix}\right)\)

How to Use Inverse of Matrix?

The inverse of matrix is useful in solving equations by using the matrix inversion method. The matrix inversion method using the formula of X = A -1 B, where X is the variable matrix, A is the coefficient matrix, and B is the constant matrix.

Can Inverse of Matrix be Calculated for an Invertible Matrix?

Yes, the inverse of matrix can be calculated for an invertible matrix . The matrix whose determinant is not equal to zero is a non-singular matrix. And for a non-singular matrix, we can find the determinant and the inverse of matrix.

When Does the Matrix Inverse not Exist in Some Cases?

The inverse of matrix exists only if its determinant value is a non-zero value and when the given matrix is a square matrix. Because the adjoint of the matrix is divided by the determinant of the matrix, to obtain the inverse of a matrix. The matrix whose determinant is a non-zero value is called a non-singular matrix. Matrix inverse is not defined for rectangular matrices .

Given a 2 × 2 Matrix, What is the Formula for Finding the Inverse of the Matrix?

For a given 2×2 matrix A = \(\left(\begin{matrix}a&b\\ \\c&d\end{matrix}\right)\) , inverse is given by A -1 = \(\dfrac{1}{ad - bc}\left(\begin{matrix}d&-b\\\\-c&a\end{matrix}\right)\). Here A -1 is the inverse of A.

What is the Inverse of Identity Matrix?

The inverse of an identity matrix is itself. This is because for any identity matrix of order I, we have I × I = I × I = I. For more information, click here .

How to Use Inverse Matrix Formula?

The inverse matrix formula can be used following the given steps:

  • Step 1: Find the matrix of minors for the given matrix.
  • Step 2: Then find the matrix of cofactors.
  • Step 3: Find the adjoint by taking the transpose of the matrix of cofactors.
  • Step 4: Divide it by the determinant.

What is 3 × 3 Inverse Matrix Formula?

The matrix inverse formula for a 3 × 3 matrix is, A -1 = adj(A)/|A|; |A| ≠ 0 where A = square matrix, adj(A) = adjoint of square matrix, A -1 = inverse matrix.

What is the Inverse of Diagonal Matrix?

The inverse of a diagonal matrix is again a diagonal matrix in which the elements of the principal diagonal of the matrix inverse are the reciprocals of the corresponding elements of the original matrix. To know how to prove this, click here .

  • Math Article

Inverse Matrix

Before calculating the inverse of a matrix let us understand what a matrix is? A matrix is a definite collection of objects arranged in rows and columns These objects are called elements of the matrix. The order of a matrix is written as number rows by number of columns. For example, 2 × 2, 2 × 3, 3 × 2, 3 × 3, 4 × 4 and so on. We can find the matrix inverse only for square matrices, whose number of rows and columns are equal such as 2 × 2, 3 × 3, etc. In simple words, inverse matrix is obtained by dividing the adjugate of the given matrix by the determinant of the given matrix. In this article, you will learn what a matrix inverse is, how to find the inverse of a matrix using different methods, properties of inverse matrix and examples in detail.

Table of Contents:

  • Inverse matrix 2×2 Example
  • Inverse matrix 3×3 Example
  • Practice problems

Matrix Inverse

If A is a non-singular square matrix, there is an existence of n x n matrix A -1 , which is called the inverse matrix of A such that it satisfies the property:

AA -1 = A -1 A = I, where I is  the Identity matrix

The identity matrix for the 2 x 2 matrix is given by

identity matrix 2 x 2

Learn: Identity matrix

It is noted that in order to find the inverse matrix, the square matrix should be non-singular whose determinant value does not equals to zero.

Let us take the square matrix A

identity matrix 2 x 2

Where a, b, c, and d represents the number.

The determinant of the matrix A is written as ad-bc, where the  value of determinant should not equal to zero for the existence of inverse . The inverse matrix can be found for 2× 2, 3× 3, …n × n matrices. Finding the inverse of a 3×3 matrix is a bit more difficult than finding the inverses of a 2 ×2 matrix .

Inverse Matrix Method

The inverse of a matrix  can be found using the three different methods. However, any of these three methods will produce the same result.

inverse-matrix-method

Similarly, we can find the inverse of a 3×3 matrix by finding the determinant value of the given matrix.

Check out : Inverse matrix calculator

One of the most important methods of finding the matrix inverse involves finding the minors and cofactors of elements of the given matrix. Observe the below steps to understand this method clearly.

  • The inverse matrix is also found using the following equation:

A -1 = adj(A)/det(A),

          w here  adj(A) refers to the adjoint of a matrix A,  det(A) refers to the determinant of a matrix A.

  • The adjoint of a matrix A or adj(A) can be found using the following method.

          In order to find the adjoint of a matrix A first, find the cofactor matrix of a given matrix and then   

          take the transpose of a cofactor matrix.

  • The cofactor of a matrix can be obtained as

C ij  = (-1) i+j  det (M ij )

Here, M ij refers to the (i,j) th   minor matrix after removing the i th row and the j th column. You can also say that the transpose of a cofactor matrix is also called the adjoint of a matrix A.

Learn how to find the adjoint of a matrix here.

Similarly, we can also find the inverse of a 3 x 3 matrix . Here also the first step would be to find the determinant, followed by the next step – Transpose.

Finding an Inverse Matrix by Elementary Transformation

Let us consider three matrices X, A and B such that X = AB. To determine the inverse of a matrix using elementary transformation, we convert the given matrix into an identity matrix.  Learn more about  how to do elementary transformations of matrices here.

If the inverse of matrix A, A -1 exists then to determine A -1 using elementary row operations

  • Write A = IA, where I is the identity matrix of the same order as A.
  • Apply a sequence of row operations till we get an identity matrix on the LHS and use the same elementary operations on the RHS to get I = BA. The matrix B on the RHS is the inverse of matrix A.
  • To find the inverse of A using column operations, write A = IA and apply column operations sequentially till I = AB is obtained, where B is the inverse matrix of A.

Click here to understand the method of finding the inverse of a matrix using elementary operations .

Inverse of a Matrix Formula

Let  \(\begin{array}{l}A=\begin{bmatrix} a &b \\ c & d \end{bmatrix}\end{array} \) be  the 2 x 2 matrix. The inverse matrix of A is given by the formula,

Let  \(\begin{array}{l}A=\begin{bmatrix} a_{11} &a_{12} & a_{13}\\ a_{21} &a_{22} &a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}\end{array} \) be  the 3 x 3 matrix. The inverse matrix is:

Inverse of 3x3 matrix formula

Inverse Matrix 2 x 2 Example

To understand this concept better let us take a look at the following example.

Example : Find the inverse of matrix A given below:

inverse-matrix-example

Inverse Matrix 3 x 3 Example

Inverse matrix 3x3 question

Determinant of the given matrix is

how to solve equations using inverse matrix

Let us find the minors of the given matrix as given below:

Inverse matrix 3x3 question sol2

Now, find the adjoint of a matrix by taking the transpose of cofactors of the given matrix.

Inverse matrix 3x3 question sol3

A -1 = (1/|A|) Adj A

Hence, the inverse of the given matrix is:

Inverse matrix 3x3 question sol2

A few important properties of the inverse matrix are listed below.

  • If A is nonsingular, then (A -1 ) -1   =  A
  • If A and B are nonsingular matrices, then AB is nonsingular. Thus, (AB) -1   =  B -1 A -1
  • If A is nonsingular then (A T ) -1   =  (A -1 ) T
  • If A is any matrix and A -1  is its inverse, then AA -1  = A -1 A = I n , where n is the order of matrices

Practice Problems

  • Find the inverse of a matrix: \(\begin{array}{l}A = \begin{bmatrix} 1 & 2 &3 \\ 3 & -2 &1 \\ 4 & 1 & 1 \end{bmatrix}\end{array} \)
  • Obtain the inverse of the matrix using elementary operations: \(\begin{array}{l} A = \begin{bmatrix} 0 & 1 &2 \\ 1 & 2 &3 \\ 3 & 1 & 1 \end{bmatrix}\end{array} \)  
  • Find the inverse of a matrix: \(\begin{array}{l}\begin{bmatrix} 1 & 2\\ 3 & 4 \end{bmatrix}\end{array} \)

To learn more about matrix and inverse of a matrix download BYJU’S- The Learning App.

Frequently Asked Questions – FAQs

What is concept inverse of a matrix, how do you find the inverse of a 3×3 matrix, is adjoint and inverse the same, how to do you know whether the given matrix has inverse, what are the properties of inverse matrix, leave a comment cancel reply.

Your Mobile number and Email id will not be published. Required fields are marked *

Request OTP on Voice Call

Post My Comment

how to solve equations using inverse matrix

Good Teacher

how to solve equations using inverse matrix

  • Share Share

Register with BYJU'S & Download Free PDFs

Register with byju's & watch live videos.

close

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons
  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

4.07: LU Decomposition for Solving Simultaneous Linear Equations

  • Last updated
  • Save as PDF
  • Page ID 126406

Lesson 1: Theory of LU Decomposition Method

Learning objectives.

After successful completion of this lesson, you should be able to:

1) solve a set of simultaneous linear equations using the LU decomposition method

2) decompose a nonsingular square matrix into the LU form.

I hear about LU decomposition used as a method to solve a set of simultaneous linear equations. What is it?

We already studied two numerical methods of finding the solution to simultaneous linear equations – Naive Gauss elimination and Gaussian elimination with partial pivoting. Then, why do we need to learn yet another method? To appreciate why LU decomposition could be a better choice than the Gauss elimination techniques in some cases, let us first discuss what LU decomposition is about.

For a nonsingular square matrix \(\left\lbrack A \right\rbrack\) on which one can successfully conduct the Naive Gauss elimination forward elimination part, one can write it as

\[\left\lbrack A \right\rbrack = \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack \nonumber\]

\[\left\lbrack L \right\rbrack = \text{Lower triangular matrix} \nonumber\]

\[\left\lbrack U \right\rbrack = \text{Upper triangular matrix} \nonumber\]

Then if one is solving a set of equations

\[\left\lbrack A \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack, \nonumber\]

\[\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack\ \text{as }\left( \lbrack A\rbrack = \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack \right) \nonumber\]

Multiplying both sides by \(\left\lbrack L \right\rbrack^{- 1}\) ,

\[\left\lbrack L \right\rbrack^{- 1}\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack L \right\rbrack^{- 1}\left\lbrack C \right\rbrack \nonumber\]

\[\left\lbrack I \right\rbrack \left\lbrack U \right\rbrack \left\lbrack X \right\rbrack = \left\lbrack L \right\rbrack^{- 1}\left\lbrack C \right\rbrack\ \text{as }\left( \left\lbrack L \right\rbrack^{- 1}\left\lbrack L \right\rbrack = \lbrack I\rbrack \right) \nonumber\]

\[\left\lbrack U \right\rbrack \left\lbrack X \right\rbrack = \left\lbrack L \right\rbrack^{- 1}\left\lbrack C \right\rbrack\ \text{as }\left( \left\lbrack I \right\rbrack\ \left\lbrack U \right\rbrack = \lbrack U\rbrack \right) \nonumber\]

\[\left\lbrack L \right\rbrack^{- 1}\left\lbrack C \right\rbrack = \left\lbrack Z \right\rbrack \nonumber\]

\[\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack\;\;\;\;\;\;\;\;\;\;\;\;(\PageIndex{1.1}) \nonumber\]

\[\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack Z \right\rbrack\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{1.2}) \nonumber\]

So we can solve Equation \((\PageIndex{1.1})\) first for \(\lbrack Z\rbrack\) by using forward substitution and then use Equation \((\PageIndex{1.2})\) to calculate the solution vector \(\left\lbrack X \right\rbrack\) by back substitution.

So how do I decompose a nonsingular matrix [A], that is, how do I find [A] = [L][U]?

If the forward elimination part of the Naive Gauss elimination methods can be applied on a nonsingular matrix \(\left\lbrack A \right\rbrack\) , then \(\left\lbrack A \right\rbrack\) can be decomposed into LU form as

\[\begin{split} \lbrack A\rbrack &= \begin{bmatrix} a_{11} & a_{12} & \ldots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \cdots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\ \end{bmatrix}\\ &= \begin{bmatrix} 1 & 0 & \ldots & 0 \\ {l}_{21} & 1 & \cdots & 0 \\ \vdots & \vdots & \cdots & \vdots \\ {l}_{n1} & {l}_{n2} & \cdots & 1 \\ \end{bmatrix}\ \ \begin{bmatrix} u_{11} & u_{12} & \ldots & u_{1n} \\ 0 & u_{22} & \cdots & u_{2n} \\ \vdots & \vdots & \cdots & \vdots \\ 0 & 0 & \cdots & u_{nn} \\ \end{bmatrix} \end{split} \nonumber\]

The elements of the \(\left\lbrack U \right\rbrack\) matrix are exactly the same as the coefficient matrix one obtains at the end of the forward elimination part in Naive Gauss elimination.

The lower triangular matrix \(\left\lbrack L \right\rbrack\) has \(1\) in its diagonal entries. The non-zero elements on the non-diagonal elements in \(\left\lbrack L \right\rbrack\) are multipliers that made the corresponding entries zero in the upper triangular matrix \(\left\lbrack U \right\rbrack\) during the forward elimination.

Audiovisual Lecture

Title : LU Decomposition Method - Theory

Summary : This video shows the basis of the LU decomposition method of solving simultaneous linear equations.

Lesson 2: Application of LU Decomposition Method

1) decompose a nonsingular matrix into the LU form.

2) solve a set of simultaneous linear equations using the LU decomposition method

Applications

So far, you now know how the LU decomposition method is used to solve simultaneous linear equations. We also learned how to decompose the coefficient matrix to use forward substitution and back substitution parts to solve a set of simultaneous linear equations..

In this lesson, we apply what we learned in the previous lesson.

Example \(\PageIndex{2.1}\)

Find the LU decomposition of the matrix

\[\left\lbrack A \right\rbrack = \begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix} \nonumber\]

\[\begin{split} \left\lbrack A \right\rbrack &= \left\lbrack L \right\rbrack \left\lbrack U \right\rbrack\\ &= \begin{bmatrix} 1 & 0 & 0 \\ {l}_{21} & 1 & 0 \\ {l}_{31} & {l}_{32} & 1 \\ \end{bmatrix}\begin{bmatrix} u_{11} & u_{12} & u_{13} \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33} \\ \end{bmatrix} \end{split} \nonumber\]

The \(\left\lbrack U \right\rbrack\) matrix is the same as found at the end of the forward elimination part of the Naive Gauss elimination method, that is

\[\left\lbrack U \right\rbrack = \begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix} \nonumber\]

To find \({l}_{21}\) and \({l}_{31}\) , find the multipliers that were used to make the \(a_{21}\) and \(a_{31}\) elements zero in the first step of the forward elimination part of the Naive Gauss elimination method. They were

\[\begin{split} {l}_{21} &= \frac{64}{25}\\ &= 2.56 \end{split} \nonumber\]

\[\begin{split} {l}_{31} &= \frac{144}{25}\\ &= 5.76 \end{split} \nonumber\]

To find \({l}_{32}\) , what multiplier was used to make \(a_{32}\) element zero? Remember that \(a_{32}\) element was made zero in the second step of the forward elimination part. The \(\left\lbrack A \right\rbrack\) matrix at the beginning of the second step of the forward elimination part was

\[\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & - 16.8 & - 4.76 \\ \end{bmatrix} \nonumber\]

\[\begin{split} {l}_{32} &= \frac{- 16.8}{- 4.8}\\ &= 3.5 \end{split} \nonumber\]

\[\left\lbrack L \right\rbrack = \begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix} \nonumber\]

Confirm \(\left\lbrack L \right\rbrack \left\lbrack U \right\rbrack = \left\lbrack A \right\rbrack\) .

\[\begin{split} \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack &= \begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix}\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}\\ &= \begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix} \end{split} \nonumber\]

Example \(\PageIndex{2.2}\)

Use the LU decomposition method to solve the following simultaneous linear equations.

\[\begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 106.8 \\ 177.2 \\ 279.2 \\ \end{bmatrix} \nonumber\]

Recall that

\[\left\lbrack A \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack \nonumber\]

then first solving

\[\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack \nonumber\]

\[\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack Z \right\rbrack \nonumber\]

gives the solution vector \(\left\lbrack X \right\rbrack\) .

Now in Example \(\PageIndex{2.1}\), we showed

\[\begin{split} \left\lbrack A \right\rbrack &= \left\lbrack L \right\rbrack \left\lbrack U \right\rbrack\\ &=\begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix}\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix} \end{split} \nonumber\]

First, solve

\[\left\lbrack L \right\rbrack\ \left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack \nonumber\]

\[\begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix}\begin{bmatrix} z_{1} \\ z_{2} \\ z_{3} \\ \end{bmatrix} = \begin{bmatrix} 106.8 \\ 177.2 \\ 279.2 \\ \end{bmatrix} \nonumber\]

\[\begin{split} &z_{1} = 106.8\\ &2.56z_{1} + z_{2} = 177.2\\ &5.76z_{1} + 3.5z_{2} + z_{3} = 279.2\end{split} \nonumber\]

Forward substitution starting from the first equation gives

\[z_{1} = 106.8 \nonumber\]

\[\begin{split} z_{2} &= 177.2 - 2.56z_{1}\\ &= 177.2 - 2.56 \times 106.8\\ &= - 96.208 \end{split} \nonumber\]

\[\begin{split} z_{3} &= 279.2 - 5.76z_{1} - 3.5z_{2}\\ &= 279.2 - 5.76 \times 106.8 - 3.5 \times \left( - 96.208 \right)\\ &= 0.76 \end{split} \nonumber\]

\[\begin{split} \left\lbrack Z \right\rbrack &= \begin{bmatrix} z_{1} \\ z_{2} \\ z_{3} \\ \end{bmatrix}\\ &= \begin{bmatrix} 106.8 \\ - 96.208 \\ 0.76 \\ \end{bmatrix} \end{split} \nonumber\]

This matrix is the same as the right-hand side obtained at the end of the forward elimination part of the Naive Gauss elimination method. Is this a coincidence?

\[\left\lbrack U \right\rbrack \left\lbrack X \right\rbrack = \left\lbrack Z \right\rbrack \nonumber\]

\[\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 106.8 \\ - 96.208 \\ 0.76 \\ \end{bmatrix} \nonumber\]

\[\begin{split} 25a_{1} + 5a_{2} + a_{3} &= 106.8\\ - 4.8a_{2} - 1.56a_{3} &= - 96.208\\ 0.7a_{3} &= 0.76 \end{split} \nonumber\]

From the third equation

\[0.7a_{3} = 0.76 \nonumber\]

\[\begin{split} a_{3} &= \frac{0.76}{0.7}\\ &= 1.0857\end{split} \nonumber\]

Substituting the value of \(a_{3}\) in the second equation,

\[- 4.8a_{2} - 1.56a_{3} = - 96.208 \nonumber\]

\[\begin{split} a_{2} &= \frac{- 96.208 + 1.56a_{3}}{- 4.8}\\ &= \frac{- 96.208 + 1.56 \times 1.0857}{- 4.8}\\ &= 19.691 \end{split} \nonumber\]

Substituting the value of \(a_{2}\) and \(a_{3}\) in the first equation,

\[25a_{1} + 5a_{2} + a_{3} = 106.8 \nonumber\]

\[\begin{split} a_{1} &= \frac{106.8 - 5a_{2} - a_{3}}{25}\\ &= \frac{106.8 - 5 \times 19.691 - 1.0857}{25}\\ &= 0.29048 \end{split} \nonumber\]

Hence the solution vector is

\[\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 0.29048 \\ 19.691 \\ 1.0857 \\ \end{bmatrix} \nonumber\]

Title : LU Decomposition Example

Summary : Learn the LU decomposition method of solving simultaneous linear equations via an example.

Lesson 3: Finding Inverse of a Matrix Using LU Decomposition Method

1) find the inverse of a matrix using the LU decomposition method.

How do I find the inverse of a square matrix using LU decomposition?

A matrix \(\left\lbrack B \right\rbrack\) is the inverse of \(\left\lbrack A \right\rbrack\) if

\[\left\lbrack A \right\rbrack\left\lbrack B \right\rbrack = \left\lbrack I \right\rbrack = \left\lbrack B \right\rbrack\left\lbrack A \right\rbrack \nonumber\]

How can we use LU decomposition to find the inverse of the matrix? Assume the first column of \(\left\lbrack B \right\rbrack\) (the inverse of \(\left\lbrack A \right\rbrack\) ) is

\[\lbrack b_{11}\ b_{12}\ldots\ \ldots b_{n1}\rbrack^{T} \nonumber\]

Then from the above definition of an inverse and the definition of matrix multiplication

\[\left\lbrack A \right\rbrack\begin{bmatrix} b_{11} \\ b_{21} \\ \vdots \\ b_{n1} \\ \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \\ \end{bmatrix} \nonumber\]

Similarly, the second column of \(\left\lbrack B \right\rbrack\) is given by

\[\left\lbrack A \right\rbrack\begin{bmatrix} b_{12} \\ b_{22} \\ \vdots \\ b_{n2} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ \vdots \\ 0 \\ \end{bmatrix} \nonumber\]

Similarly, all columns of \(\left\lbrack B \right\rbrack\) can be found by solving \(n\) different sets of equations with the column of the right-hand side being the \(n\) columns of the identity matrix.

In the previous lessons, we learned how to solve simultaneous linear equations using the LU decomposition method.

Example \(\PageIndex{3.1}\)

Use LU decomposition to find the inverse of

Knowing that from the previous lesson,

\[\begin{split} \left\lbrack A \right\rbrack &= \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\\ &= \begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix}\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix} \end{split} \nonumber\]

We can solve for the first column of \(\lbrack B\rbrack = \left\lbrack A \right\rbrack^{- 1}\) by solving for

\[\begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}\begin{bmatrix} b_{11} \\ b_{21} \\ b_{31} \\ \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 0 \\ \end{bmatrix} \nonumber\]

\[\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack, \nonumber\]

\[\begin{bmatrix} 1 & 0 & 0 \\ 2.56 & 1 & 0 \\ 5.76 & 3.5 & 1 \\ \end{bmatrix}\begin{bmatrix} z_{1} \\ z_{2} \\ z_{3} \\ \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 0 \\ \end{bmatrix} \nonumber\]

\[\begin{split} &z_{1} = 1\\ &2.56z_{1} + z_{2} = 0\\ &5.76z_{1} + 3.5z_{2} + z_{3} = 0 \end{split} \nonumber\]

\[z_{1} = 1 \nonumber\]

\[\begin{split} z_{2} &= 0 - 2.56z_{1}\\ &= 0 - 2.56\left( 1 \right)\\ &= - 2.56 \end{split} \nonumber\]

\[\begin{split} z_{3} &= 0 - 5.76z_{1} - 3.5z_{2}\\ &= 0 - 5.76\left( 1 \right) - 3.5\left( - 2.56 \right)\\ &= 3.2 \end{split} \nonumber\]

\[\begin{split} \left\lbrack Z \right\rbrack &= \begin{bmatrix} z_{1} \\ z_{2} \\ z_{3} \\ \end{bmatrix}\\ &= \begin{bmatrix} 1 \\ - 2.56 \\ 3.2 \\ \end{bmatrix} \end{split} \nonumber\]

\[\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}\begin{bmatrix} b_{11} \\ b_{21} \\ b_{31} \\ \end{bmatrix} = \begin{bmatrix} 1 \\ - 2.56 \\ 3.2 \\ \end{bmatrix} \nonumber\]

\[\begin{split} 25b_{11} + 5b_{21} + b_{31} &= 1\\ - 4.8b_{21} - 1.56b_{31} &= - 2.56\\ 0.7b_{31} &= 3.2 \end{split} \nonumber\]

Backward substitution starting from the third equation gives

\[\begin{split} b_{31} &= \frac{3.2}{0.7}\\ &= 4.571 \end{split} \nonumber\]

\[\begin{split} b_{21} &= \frac{- 2.56 + 1.56b_{31}}{- 4.8}\\ &= \frac{- 2.56 + 1.56(4.571)}{- 4.8}\\ &= - 0.9524 \end{split} \nonumber\]

\[\begin{split} b_{11} &= \frac{1 - 5b_{21} - b_{31}}{25}\\ &= \frac{1 - 5( - 0.9524) - 4.571}{25}\\ &= 0.04762 \end{split} \nonumber\]

Hence the first column of the inverse of \(\left\lbrack A \right\rbrack\) is

\[\begin{bmatrix} b_{11} \\ b_{21} \\ b_{31} \\ \end{bmatrix} = \begin{bmatrix} 0.04762 \\ - 0.9524 \\ 4.571 \\ \end{bmatrix} \nonumber\]

Similarly, solving

\[\begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}\begin{bmatrix} b_{12} \\ b_{22} \\ b_{32} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ \end{bmatrix}\ \text{gives }\begin{bmatrix} b_{12} \\ b_{22} \\ b_{32} \\ \end{bmatrix} = \begin{bmatrix} - 0.08333 \\ 1.417 \\ - 5.000 \\ \end{bmatrix} \nonumber\]

and solving

\[\begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}\begin{bmatrix} b_{13} \\ b_{23} \\ b_{33} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \\ \end{bmatrix}\ \text{gives }\begin{bmatrix} b_{13} \\ b_{23} \\ b_{33} \\ \end{bmatrix} = \begin{bmatrix} 0.03571 \\ - 0.4643 \\ 1.429 \\ \end{bmatrix} \nonumber\]

\[\left\lbrack A \right\rbrack^{- 1} = \begin{bmatrix} 0.04762 & - 0.08333 & 0.03571 \\ - 0.9524 & 1.417 & - 0.4643 \\ 4.571 & - 5.000 & 1.429 \\ \end{bmatrix} \nonumber\]

Can you confirm the following for the above example?

\[\left\lbrack A \right\rbrack\ \left\lbrack A \right\rbrack^{- 1} = \left\lbrack I \right\rbrack = \left\lbrack A \right\rbrack^{- 1}\left\lbrack A \right\rbrack \nonumber\]

Did you also note that the decomposition of \([A]\) to \([L][U]\) needed to be done only once?

Title : LU Decomposition Method: Finding Inverse of a Matrix - Example

Summary : This video shows an example how LU decomposition method can be used to find inverse of a matrix.

Lesson 4: Computational Efficiency

1) justify why using the LU decomposition method is more efficient than Gaussian elimination in some cases.

LU decomposition looks more complicated than Gaussian elimination. Do we use LU decomposition because it is computationally more efficient than Gaussian elimination to solve a set of n equations given by \([A][X]=[C]\) ?

Note: The formulas for the computational time in this lesson assume it takes 4 clock cycles each for an add, subtract, or multiply operation, and 16 clock cycles for a divide operation as is the case for a typical AMD®-K7 chip. <http://www.isi.edu/~draper/papers/mwscas07_kwon.pdf> . These clock cycle times taken by an arithmetic operation and the number of such operations allow us to find the computational time for each of the processes.

For a square matrix \(\lbrack A\rbrack\) of \(n \times n\) size, the computational time \({CT}|_{DE}\) to decompose the \(\lbrack A\rbrack\) matrix to \(\lbrack L\rbrack\lbrack U\rbrack\) form is given by

\[{CT}|_{DE} = T\left( \frac{8n^{3}}{3} + 4n^{2} - \frac{20n}{3} \right),\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.1}) \nonumber\]

\[T = \text{clock cycle time} \nonumber\]

The computational time \({CT}|_{FS}\) for forward substitution: \(\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack\) is given by

\[{CT}|_{FS} = T\left( 4n^{2} - 4n \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.2}) \nonumber\]

The computational time \({CT}|_{BS}\) for back substitution: \(\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack Z \right\rbrack\) is given by

\[{CT}|_{BS} = T\left( 4n^{2} + 12n \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.3}) \nonumber\]

So, the total computational time to solve a set of simultaneous linear equations by LU decomposition is

\[\begin{split} {CT}|_{LU} &= {CT}|_{DE} + {CT}|_{FS} + {CT}|_{BS}\\ &= T\left( \frac{8n^{3}}{3} + 4n^{2} - \frac{20n}{3} \right) + T\left( 4n^{2} - 4n \right) + T\left( 4n^{2} + 12n \right)\\ &= T\left( \frac{8n^{3}}{3} + 12n^{2} + \frac{4n}{3} \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.4}) \end{split} \nonumber\]

Now let us look at the computational time taken by Naive Gaussian elimination. The computational time \({CT}|_{FE}\) for the forward elimination part is

\[{CT}|_{FE} = T\left( \frac{8n^{3}}{3} + 8n^{2} - \frac{32n}{3} \right),\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.5}) \nonumber\]

and the computational time \({CT}|_{BS}\) for the back substitution part is

\[{CT}|_{BS} = T\left( 4n^{2} + 12n \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.6}) \nonumber\]

So, the total computational time \({CT}|_{GE}\) to solve a set of simultaneous linear equations by Gaussian Elimination is

\[\begin{split} {CT}|_{GE} &= {CT}|_{FE} + {CT}|_{BS}\\ &= T\left( \frac{8n^{3}}{3} + 8n^{2} - \frac{32n}{3} \right) + T\left( 4n^{2} + 12n \right)\\ &= T\left( \frac{8n^{3}}{3} + 12n^{2} + \frac{4n}{3} \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.7}) \end{split} \nonumber\]

The computational times for Gaussian elimination and LU decomposition are identical.

This has confused me further! Why should I learn LU decomposition method when it takes the same computational time as Gaussian elimination, and that too when the two methods are closely related in the procedure? Please convince me that LU decomposition has its place in solving linear equations!

We now know to convince you that the LU decomposition method has its place in the solution of simultaneous linear equations. Let us examine an example where the LU decomposition method would be computationally more efficient than Gaussian elimination.

Remember, in trying to find the inverse of the matrix \(\lbrack A\rbrack\) in a previous lesson, the problem reduces to solving \(n\) sets of equations with the \(n\) columns of the identity matrix as the RHS vector. For calculations of each column of the inverse of the \(\lbrack A\rbrack\) matrix, the coefficient matrix \(\lbrack A\rbrack\) matrix in the set of equation \(\left\lbrack A \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack\) does not change. So, if we use the LU decomposition method, the decomposition \(\left\lbrack A \right\rbrack = \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) needs to be done only once, the forward substitution (Equation \(\PageIndex{4.1}\)) \(n\) times, and the back substitution (Equation \(\PageIndex{4.2}\)) \(n\) times.

Therefore, the total computational time \({CT}|_{inverse \ LU}\) required to find the inverse of a matrix using \(LU\) decomposition is

\[\begin{split} {CT}|_{inverse\ LU} &= 1 \times {CT}|_{DE} + n \times {CT}|_{FS} + n \times {CT}|_{BS}\\ &= 1 \times T\left( \frac{8n^{3}}{3} + 4n^{2} - \frac{20n}{3} \right) + n \times T\left( 4n^{2} - 4n \right) + n \times T\left( 4n^{2} + 12n \right)\\ &= T\left( \frac{32n^{3}}{3} + 12n^{2} - \frac{20n}{3} \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.8}) \end{split} \nonumber\]

In comparison, if the Naive Gaussian elimination method were used to find the inverse of a matrix, the forward elimination part, as well as the back substitution part will have to be done \(n\) times. The total computational time \({CT}|_{inverse\ GE}\) required to find the inverse of a matrix by using Naive Gaussian elimination then is

\[\begin{split} {CT}|_{inverse\ GE} &= n \times {CT}|_{FE} + n \times {CT}|_{BS}\\ &= n \times T\left( \frac{8n^{3}}{3} + 8n^{2} - \frac{32n}{3} \right) + n \times T\left( 4n^{2} + 12n \right)\\ &= T\left( \frac{8n^{4}}{3} + 12n^{3} + \frac{4n^{2}}{3} \right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{4.9}) \end{split}\]

Clearly, for large \(n\) , \({CT}|_{inverse \ GE} >>{CT}|_{inverse \ LU}\), as \({CT}|_{inverse \ GE}\) has the dominating terms of \(n^{4}\) and \({CT}|_{inverse \ LU}\) has the dominating terms of \(n^{3}\) . For large values of \(n\) , the Gaussian elimination method would take more computational time (approximately \(n/4\) times – prove it) than the LU decomposition method. Typical values of the ratio of the computational time for different values of \(n\) are given in Table \(\PageIndex{4.1}\).

Are you convinced now that LU decomposition has its place in solving systems of equations when we have to solve for multiple right-hand side vectors while the coefficient matrix stays unchanged?

Title : Why Use LU Decomposition?

Summary : This video discusses why LU decomposition method is used for solving simultaneous linear equations.

How much computational time does it take to conduct back substitution in the LU Decomposition method?

At the beginning of back substitution, the set of equations is of the form

\[\left\lbrack U \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack B \right\rbrack \nonumber\]

\[\left\lbrack U \right\rbrack = \text{upper triangular matrix},\ n \times n, \nonumber\] \[\left\lbrack X \right\rbrack = \text{unknown vector},\ n \times 1,\ \text{and} \nonumber\]

\[\left\lbrack B \right\rbrack = \text{right-hand side vector},\ n \times 1. \nonumber\]

The algorithm for finding the unknown vector is

\[x_{n} = \frac{b_{n}}{u_{nn}} \;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{A.1}) \nonumber\]

\[x_{i} = \frac{b_{i} - \displaystyle \sum_{j = i + 1}^{n} u_{j}x_{j}}{u_{ii}},\ i = n-1,\ n-2,\ ...,\ 2,\ 1\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{A.2}) \nonumber\]

For an arithmetic progression series summation

\[S = a_{1} + a_{2} + ... + a_{m - 1} + a_{m} \nonumber\]

\[\frac{m}{2}(a_{1} + a_{m}) \nonumber\]

\[\frac{m}{2}(2a_1 + (m-1)d) \nonumber\]

\[d = a_{i + 1} - a_{i},i = 1,2..,m - 1 \nonumber\]

When you add \(n\) terms together, there are \(n-1\) additions.

Now let us see how many arithmetic operations are needed to complete the algorithm.

Number of Divisions

See equation \((\PageIndex{A.1})\). We have one operation of division for the calculation of \(x_{n}\) .

See equation \((\PageIndex{A.2})\). For each \(x_{i}\) , \(i = n - 1,n - 2,...,2,1\) , the result is divided once by \(u_{ii}\) .

So, the total number of divisions is \(1+(n-1) =n\)

Number of Subtractions

See equation \((\PageIndex{A.2})\). For each \(x_{i}\) , \(i = n - 1,n - 2,...,2,1\) , we have 1 subtraction in the numerator.

So, the total number of subtractions is \(n-1\) .

Number of Multiplications

See equation \((\PageIndex{A.2})\). For a particular \(i\) , there are \(\left( n - i \right)\) multiplications — just count the \(u_{ij}x_{j}\) terms within the summation in the numerator. Since \(i\) takes the values of \(i = n - 1,n - 2,...,2,1\) , you can see that

when \(i=n-1\) , there is \((n-(n-1))=1\) multiplication,

when \(i=n-2\) , there are \((n-(n-2))=2\) multiplications,

when \(i=1\) , there are \((n-1)=n-1\) multiplications.

So, the total number of multiplications is

\[\begin{split} &1 + 2 + ... + (n - 1)\\ &= \frac{n - 1}{2}(1 + (n - 1))\\ &= \frac{n(n - 1)}{2} \end{split} \nonumber\]

Number of Additions

For a particular \(i\) , there are \(\left( n - i - 1 \right)\) additions – just see the number of \(u_{ij}x_{j}\) terms within the summation in the numerator of equation \((\PageIndex{A.2})\).

Since \(i\) takes the values of \(i = n - 1,n - 2,...,2,1\) , you can see that

when \(i=n-1\) , there is \((n-(n-1)-1))=0\) addition,

when \(i=n-2\) , there is \((n-(n-2)-1))=1\) addition,

when \(i=1\) , there are \((n-(1)-1))=n-2\) additions.

So, the total number of additions is

\[\begin{split} &0 + 1 + 2 + ... + (n - 2)\\ &= \frac{n - 1}{2}(0 + (n - 2))\\ &= \frac{(n - 1)(n - 2)}{2} \end{split} \nonumber\]

Computational Time

Assuming it takes 4 clock cycles for each addition, subtraction, and multiplication, and 16 clock cycles for each division, then if \(C\) is the clock cycle time,

computational time spent on divisions= \(n \times (16C) = 16Cn\)

computational time spent on subtractions \(= \left( n - 1 \right) \times (4C) = 4C(n - 1)\)

computational time spent on multiplications \(\displaystyle = \frac{n(n - 1)}{2} \times (4C) = 2Cn(n - 1)\)

computational time spent on additions \(\displaystyle= \frac{(n - 1)(n - 2)}{2} \times (4C) = 2C(n - 1)(n - 2)\)

The total computational time spent on back substitution then is \[\begin{split} &=\text{Total time for divisions} + \text{Total time for subtractions} \\ &+ \text{Total time for multiplications} + \text{Total time for additions}\\ &= (16Cn) + (4Cn - 4C) + (2Cn^{2} - 2Cn) + (2Cn^{2} - 6Cn + 4C)\\ &= 4Cn^{2} + 12Cn\\ &= C(4n^{2} + 12n) \end{split} \nonumber\]

Questions Related to the Appendix

1. How much computational time does it take to conduct forward substitution?

2. How much computational time does it take to conduct forward elimination?

3. How much computational time does it take to conduct back substitutions?

4. How much computational time does it take to conduct Naive Gaussian elimination?

5. How much computational time does it take to conduct LU decomposition?

6. How much computational time does it take to find the inverse of a square matrix using LU decomposition?

7. How much computational time does it take to find the inverse of a square matrix using Gaussian elimination?

Multiple Choice Test

(1). The \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) decomposition method is computationally more efficient than Naive Gauss elimination for solving

(A). a single set of simultaneous linear equations.

(B). multiple sets of simultaneous linear equations with different coefficient matrices and the same right-hand side vectors.

(C). multiple sets of simultaneous linear equations with the same coefficient matrix and different right-hand side vectors.

(D). less than ten simultaneous linear equations.

(2). The lower triangular matrix \(\left\lbrack L \right\rbrack\) in the \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) decomposition of the matrix given below

\[\begin{bmatrix} 25 & 5 & 4 \\ 10 & 8 & 16 \\ 8 & 12 & 22 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ \mathcal{l}_{21} & 1 & 0 \\ \mathcal{l}_{31} & \mathcal{l}_{32} & 1 \\ \end{bmatrix}\begin{bmatrix} u_{11} & u_{12} & u_{13} \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33} \\ \end{bmatrix} \nonumber\] is

(A) \(\begin{bmatrix} 1 & 0 & 0 \\ 0.40000 & 1 & 0 \\ 0.32000 & 1.7333 & 1 \\ \end{bmatrix}\)

(B) \(\begin{bmatrix} 25 & 5 & 4 \\ 0 & 6 & 14.400 \\ 0 & 0 & - 4.2400 \\ \end{bmatrix}\)

(C) \(\begin{bmatrix} 1 & 0 & 0 \\ 10 & 1 & 0 \\ 8 & 12 & 0 \\ \end{bmatrix}\)

(D) \(\begin{bmatrix} 1 & 0 & 0 \\ 0.40000 & 1 & 0 \\ 0.32000 & 1.5000 & 1 \\ \end{bmatrix}\)

(3). The upper triangular matrix \(\left\lbrack U \right\rbrack\) in the \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) decomposition of the matrix given below

\[\begin{bmatrix} 25 & 5 & 4 \\ 0 & 8 & 16 \\ 0 & 12 & 22 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ \mathcal{l}_{21} & 1 & 0 \\ \mathcal{l}_{31} & \mathcal{l}_{32} & 1 \\ \end{bmatrix}\begin{bmatrix} u_{11} & u_{12} & u_{13} \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33} \\ \end{bmatrix} \nonumber\]

(C) \(\begin{bmatrix} 25 & 5 & 4 \\ 0 & 8 & 16 \\ 0 & 0 & - 2 \\ \end{bmatrix}\)

(D) \(\begin{bmatrix} 1 & 0.2000 & 0.16000 \\ 0 & 1 & 2.4000 \\ 0 & 0 & - 4.240 \\ \end{bmatrix}\)

(4). For a given \(2000 \times 2000\) matrix \(\left\lbrack A \right\rbrack\) , assume that it takes about \(15\) seconds to find the inverse of \(\left\lbrack A \right\rbrack\) by the use of the \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) decomposition method, that is, finding the \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) once, and then doing forward substitution and back substitution \(2000\) times using the \(2000\) columns of the identity matrix as the right-hand side vector. The approximate time in seconds that it will take to find the inverse if found by repeated use of the Naive Gauss elimination method, that is, doing forward elimination and back substitution \(2000\) times by using the \(2000\) columns of the identity matrix as the right-hand side vector, is most nearly

(A) \(300\)

(B) \(1500\)

(C) \(7500\)

(D) \(30000\)

(5). The algorithm for solving a set of \(n\) equations \(\left\lbrack A \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack\) , where \(\left\lbrack A \right\rbrack = \left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) involves solving \(\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack\) by forward substitution. The algorithm to solve \(\left\lbrack L \right\rbrack\left\lbrack Z \right\rbrack = \left\lbrack C \right\rbrack\) is given by

(A) \(z_{1} = c_{1}/l_{11}\)

for i from 2 to n do

for j from 1 to i do

sum = sum + l_ij * z_j

z_i = (c_i - sum)/l_i

(B) \(z_{1} = c_{1}/l_{11}\)

for j from 1 to (i - 1) do

z_i = (c_i - sum)/l_ij

(C) \(z_{1} = c_{1}/l_{11}\)

z_i = (c_i - sum)/l_ii

(D) for i from 2 to n do

(6). To solve boundary value problems, a numerical method based on the finite difference method is used. This results in simultaneous linear equations with tridiagonal coefficient matrices. These are solved using a specialized \(\left\lbrack L \right\rbrack\left\lbrack U \right\rbrack\) decomposition method.

Choose the set of equations that approximately solves the boundary value problem

\[\frac{d^{2}y}{dx^{2}} = 6x - 0.5x^{2},\ \ y\left( 0 \right) = 0,\ \ y\left( 12 \right) = 0,\ \ 0 \leq x \leq 12 \nonumber\]

The second derivative in the above equation is approximated by the second-order accurate central divided difference approximation as learned in the numerical differentiation lessons (Chapter 02.02). A step size of \(h = 4\) is used, and hence the value of \(y\) can be found approximately at equidistantly placed 4 nodes between \(x = 0\) and \(x = 12\) .

(A) \(\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0.0625 & 0.125 & 0.0625 & 0 \\ 0 & 0.0625 & 0.125 & 0.0625 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}\begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \\ y_{4} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 16.0 \\ 16.0 \\ 0 \\ \end{bmatrix}\)

(B) \(\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0.0625 & - 0.125 & 0.0625 & 0 \\ 0 & 0.0625 & - 0.125 & 0.0625 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}\begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \\ y_{4} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 16.0 \\ 16.0 \\ 0 \\ \end{bmatrix}\)

(C) \(\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0.0625 & - 0.125 & 0.0625 & 0 \\ 0 & 0.0625 & - 0.125 & 0.0625 \\ \end{bmatrix}\begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \\ y_{4} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 16.0 \\ 16.0 \\ 0 \\ \end{bmatrix}\)

(D) \(\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0.0625 & 0.125 & 0.0625 & 0 \\ 0 & 0.0625 & 0.125 & 0.0625 \\ \end{bmatrix}\begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \\ y_{4} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 16.0 \\ 16.0 \\ \end{bmatrix}\)

For complete solution, go to

http://nm.mathforcollege.com/mcquizzes/04sle/quiz_04sle_ludecomposition_solution.pdf

Problem Set

(1). Show that LU decomposition method is computationally a more efficient way of finding the inverse of a square matrix than using Gaussian elimination. See book for answer.

(2). Use LU decomposition to find \([L]\) and \([U]\)

\[4x_{1} + x_{2} - x_{3} = - 2 \nonumber\] \[5x_{1} + x_{2} + 2x_{3} = 4 \nonumber\] \[6x_{1} + x_{2} + x_{3} = 6 \nonumber\]

\\left[L\right]\left[U\right]=\left[\begin{matrix}1&0&0\\1.25&1&0\\1.5&2&1\\\end{matrix}\right]\left[\begin{matrix}4&1&-1\\0&-0.25&3.25\\0&0&-4\\\end{matrix}\right]\)

(3). Find the inverse of

\[\lbrack A\rbrack = \begin{bmatrix} 3 & 4 & 1 \\ 2 & - 7 & - 1 \\ 8 & 1 & 5 \\ \end{bmatrix} \nonumber\]

using the LU decomposition method.

\(\left[A\right]^{-1}=\left[\begin{matrix}0.29310&0.169379&-0.025862\\0.1551&-0.060345&-0.043103\\-0.5&-0.25&0.25\\\end{matrix}\right]\)

(4). Fill in the blanks for the unknowns in the LU decomposition of the matrix given below

\[\begin{bmatrix} 25 & 5 & 4 \\ 75 & 7 & 16 \\ 12.5 & 12 & 22 \\ \end{bmatrix} = \begin{bmatrix} \mathcal{l}_{11} & 0 & 0 \\ \mathcal{l}_{21} & \mathcal{l}_{22} & 0 \\ \mathcal{l}_{31} & \mathcal{l}_{32} & \mathcal{l}_{33} \\ \end{bmatrix}\begin{bmatrix} 25 & 5 & 4 \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33} \\ \end{bmatrix} \nonumber\]

\(\left[L\right]=\left[\begin{matrix}1&0&0\\3&1&0\\0.5&-1.1875&1\\\end{matrix}\right];\ \left[U\right]=\left[\begin{matrix}25&5&4\\0&-8&4\\0&0&24.75\\\end{matrix}\right]\)

(5). Show that the nonsingular matrix

\[\left\lbrack A \right\rbrack = \begin{bmatrix} 0 & 2 \\ 2 & 0 \\ \end{bmatrix} \nonumber\]

cannot be decomposed into the LU form.

Since the \(a_{11}=0\) , the first step of the forward elimination part of Gaussian elimination will involve a division by zero.

(6). The LU decomposition of

\[\lbrack A\rbrack = \begin{bmatrix} 4 & 1 & - 1 \\ 5 & 1 & 2 \\ 6 & 1 & 1 \\ \end{bmatrix} \nonumber\]

is given by

\[\begin{bmatrix} 4 & 1 & - 1 \\ 5 & 1 & 2 \\ 6 & 1 & 1 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 1.25 & 1 & 0 \\ 1.5 & 2 & 1 \\ \end{bmatrix}\begin{bmatrix} ?? & ?? & ?? \\ 0 & ?? & ?? \\ 0 & 0 & ?? \\ \end{bmatrix} \nonumber\]

Find the upper triangular matrix in the above decomposition.

\(\left[U\right]=\left[\begin{matrix}4&1&-1\\0&-0.25&3.25\\0&0&-4\\\end{matrix}\right]\)

IMAGES

  1. how to solve equations using inverse matrix

    how to solve equations using inverse matrix

  2. Solving Systems of Equations with Matrix Inverses

    how to solve equations using inverse matrix

  3. inverse matrix method to solve a system of equations [A]^-1[B]

    how to solve equations using inverse matrix

  4. Solving systems of equations using inverse matrix

    how to solve equations using inverse matrix

  5. Using the Inverse of a Matrix to Solve a System of Equations

    how to solve equations using inverse matrix

  6. Question Video: Using the Inverse Matrix to Solve a System of Linear

    how to solve equations using inverse matrix

VIDEO

  1. Inverse Matrix Math Solve

  2. Solving Eq.

  3. Matrices and Determinate 17: Inverse Matrix Method To Solve Linear Equations : Part

  4. solving 2 linear equations using inverse matrix method by Matlab

  5. Inverse of a matrix and solving systems using inverse matrix

  6. Inverse of a Matrix

COMMENTS

  1. 7.8: Solving Systems with Inverses

    To solve a system of linear equations using an inverse matrix, let \(A\) be the coefficient matrix, let \(X\) be the variable matrix, and let \(B\) be the constant matrix. Thus, we want to solve a system \(AX=B\). For example, look at the following system of equations. \(a_1x+b_1y=c_1\) \(a_2x+b_2y=c_2\) From this system, the coefficient matrix is

  2. How to Solve a System of Equations using Inverse of Matrices?

    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.

  3. Solving a System of Linear Equations Using the Inverse of a Matrix

    The only difference between a solving a linear equation and a system of equations written in matrix form is that finding the inverse of a matrix is more complicated, and matrix multiplication is a longer process. However, the goal is the same—to isolate the variable.

  4. How to Solve a System of Equations Using the Inverse of a Matrix

    How to solve the equations Armed with a system of equations and the knowledge of how to use inverse matrices, you can follow a series of simple steps to arrive at a solution to the system, again using the trusty old matrix. For instance, you can solve the system that follows by using inverse matrices: These steps show you the way:

  5. 2.4: Solving Systems with Inverses

    Using matrix multiplication, we may define a system of equations with the same number of equations as variables as \[AX = B \nonumber \] To solve a system of linear equations using an inverse matrix, let \(A\) be the coefficient matrix, let \(X\) be the variable matrix, and let \(B\) be the constant matrix. Thus, we want to solve a system \(AX ...

  6. Inverse Matrices Solving Systems of Equations

    Learn how to use inverse matrices to solve systems of equations in this free math video tutorial by Mario's Math Tutoring. Show more Show more Shop the Mario's Math Tutoring store

  7. Representing linear systems with matrix equations

    Lesson 16: Solving equations with inverse matrices Representing linear systems with matrix equations Use matrices to represent systems of equations Solving linear systems with matrices Matrix word problem: vector combination Math > Algebra (all content) > Matrices > Solving equations with inverse matrices

  8. Matrices to solve a system of equations

    Using the inverse of a matrix to solve a system of equations.Practice this yourself on Khan Academy right now: https://www.khanacademy.org/e/writing-systems-...

  9. 7.7 Solving Systems with Inverses

    Solve a system of linear equations using an inverse matrix. Nancy plans to invest $10,500 into two different bonds to spread out her risk. The first bond has an annual return of 10%, and the second bond has an annual return of 6%. ... Solving a 2 × 2 System Using the Inverse of a Matrix. Solve the given system of equations using the inverse of ...

  10. Reading: Solving a System of Linear Equations Using the Inverse of a Matrix

    We can augment a 3 × 3 matrix with the identity on the right and use row operations to turn the original matrix into the identity, and the matrix on the right becomes the inverse. Write the system of equations as. A X = B. \displaystyle {A} {X}= {B} AX = B. We can also use a calculator to solve a system of equations with matrix inverses.

  11. Inverse matrices and matrix equations (video)

    Inverse matrices and matrix equations Google Classroom About Transcript In other videos, we've seen how matrices can represent systems of equations, and we've also seen how matrices whose determinant is zero don't have an inverse.

  12. Solving Systems of Linear Equations Using Matrices

    X = A -1 B What does that mean? It means that we can find the X matrix (the values of x, y and z) by multiplying the inverse of the A matrix by the B matrix. So let's go ahead and do that.

  13. 2.7: Finding the Inverse of a Matrix

    How can we find the inverse of a matrix, if it exists? This section introduces the method of Gaussian elimination and the concept of elementary matrices to answer this question. You will also learn how to check if a matrix is invertible and how to use its inverse to solve systems of linear equations. This section is part of a first course in linear algebra, which covers the basics of matrices ...

  14. Inverse Matrix Method Calculator

    To solve a system of linear equations using inverse matrix method you need to do the following steps. Set the main matrix and calculate its inverse (in case it is not singular). Multiply the inverse matrix by the solution vector. The result vector is a solution of the matrix equation.

  15. Solving a System Using an Inverse

    To solve a system of linear equations using an inverse matrix, let A A be the coefficient matrix, let X X be the variable matrix, and let B B be the constant matrix. Thus, we want to solve a system AX =B A X = B. For example, look at the following system of equations. a1x+b1y =c1 a2x+b2y =c2 a 1 x + b 1 y = c 1 a 2 x + b 2 y = c 2

  16. PDF 5.6 Using the inverse matrix to solve equations

    Using the inverse matrix to solve equations Introduction One of the most important applications of matrices is to the solution of linear simultaneous equations. On this leaflet we explain how this can be done. 1. Writing simultaneous equations in matrix form Consider the simultaneous equations x + 2y = 4 3x − 5y = 1

  17. Algebra

    Algebra - Solving Linear Equations using the Inverse Matrix Method 2/2 Michel van Biezen 1M subscribers Subscribe Subscribed 278 25K views 11 years ago ALGEBRA 0 Visit...

  18. Inverse of a Matrix

    8 × 1 8 = 1 When we multiply a matrix by its inverse we get the Identity Matrix (which is like "1" for matrices): A × A -1 = I Same thing when the inverse comes first: 1 8 × 8 = 1 A -1 × A = I Identity Matrix We just mentioned the "Identity Matrix". It is the matrix equivalent of the number "1": I = 1 0 0 0 1 0 0 0 1 A 3x3 Identity Matrix

  19. 8.4: Systems of Linear Equations: Matrix Inverses

    The only difference between the systems is the constants which is the matrix B in the associated matrix equation AX = B. We solve each of them using the formula X = A − 1B . X = A − 1B = [ 9 13 2 13 − 7 13 − 10 13 − 8 13 15 13 − 2 13 1 13 3 13][ 26 39 117] = [− 39 91 26]. Our solution is ( − 39, 91, 26).

  20. Inverse of Matrix

    The inverse of matrix A can be computed using the inverse of matrix formula, A -1 = (adj A)/ (det A). i.e., by dividing the adjoint of a matrix by the determinant of the matrix. The inverse of a matrix can be calculated by following the given steps: Step 1: Calculate the minors of all elements of A.

  21. Use matrices to solve systems of equations

    This is the inverse of matrix A : A − 1 = [ 5 7 − 6 11 16 − 14 7 10 − 9] Solve the system. x = y = z = Show Calculator Stuck? Review related articles/videos or use a hint. Report a problem Do 4 problems Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more.

  22. Inverse matrices and matrix equations

    Inverse matrices and matrix equations | Matrices | Precalculus | Khan Academy - YouTube - [Instructor] In a previous video, we talked about 0:00 / 7:29 Keep going! Check out the next lesson...

  23. Inverse Matrix

    Method 1: Similarly, we can find the inverse of a 3×3 matrix by finding the determinant value of the given matrix.

  24. Data-driven Estimation of the Algebraic Riccati Equation for the

    In this paper, we propose a method for estimating the algebraic Riccati equation (ARE) with respect to an unknown discrete-time system from the system state and input observation. The inverse optimal control (IOC) problem asks, ``What objective function is optimized by a given control system?'' The inverse linear quadratic regulator (ILQR) problem is an IOC problem that assumes a linear system ...

  25. 4.07: LU Decomposition for Solving Simultaneous Linear Equations

    In comparison, if the Naive Gaussian elimination method were used to find the inverse of a matrix, the forward elimination part, as well as the back substitution part will have to be done \(n\) times. The total computational time \({CT}|_{inverse\ GE}\) required to find the inverse of a matrix by using Naive Gaussian elimination then is