Skip to main content
Mathematics LibreTexts

The Inverse of a Matrix

  • Page ID
    218294
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Inverse of a Matrix

    Definition and Examples

    Recall that functions f and g are inverses if

            f(g(x))  =  g(f(x))  =  x

    We will see later that matrices can be considered as functions from Rn to Rm and that matrix multiplication is composition of these functions.  With this knowledge, we have the following:

    Let A and B be n x n matrices then A and B are inverses of each other, then

           AB  =  BA  =  In

     

    Example

    Consider the matrices

         \( A = \begin{pmatrix} 2 & 0 & -1 \\ -3 & 0 & 2  \\ -2 & -1 & 0 \end{pmatrix}  B = \begin{pmatrix} 2 & 1 & 0 \\ -4 & -2 & -1  \\ 3 & 2 & 0 \end{pmatrix}   \)

            

    We can check that when we multiply A and B in either order we get the identity matrix.  (Check this.)

    Not all square matrices have inverses.  If a matrix has an inverse, we call it nonsingular or invertible.  Otherwise it is called singular.  We will see in the next section how to determine if a matrix is singular or nonsingular.


    Properties of Inverses

    Below are four properties of inverses. 

    1. If A is nonsingular, then so is A-1 and

               
      (A-1) -1  =  A
       
    2. If A and B are nonsingular matrices, then AB is nonsingular and

              (AB) -1  =  B-1A-1

       
    3. If A is nonsingular then

                (AT) -1  =  (A -1)T
       
    4. If A and B are matrices with

              AB  =  In

      then A and B are inverses of each other.

    Notice that the fourth property implies that if AB  =  I then BA  =  I.

    The first three properties' proof are elementary, while the fourth is too advanced for this discussion.  We will prove the second.

    Proof that (AB) -1  =  B -1 A -1

    By property 4, we only need to show that

            (AB)(B -1 A -1)  =  I

    We have

            (AB)(B -1 A -1)  =  A(BB -1)A -1     associative property

           =  AIA-1        definition of inverse

            =  AA-1       definition of the identity matrix

           =  I               definition of inverse


    Finding the Inverse

    Now that we understand what an inverse is, we would like to find a way to calculate and inverse of a nonsingular matrix.  We use the definitions of the inverse and matrix multiplication.  Let A be a nonsingular matrix and B be its inverse.  Then

            AB  =  I

    Recall that we find the jth column of the product by multiplying A by the jth column of B.  Now for some notation.  Let ej be the m x 1 matrix that is the jth column of the identity matrix and xj be the jth column of B.  Then 

            Axj  =  ej 

    We can write this in augmented form

            [A|ej]

    Instead of solving these augmented problems one at a time using row operations, we can solve them simultaneously.  We solve

            [A | I]

     

    Example

    Find the inverse of the matrix

         \( A = \begin{pmatrix} 1 & 0 & 4 \\ 1 & 1 & 6  \\ -3 & 0 & -10 \end{pmatrix}  \)

     

    Solution

       \( \left[\begin{array}{ccc|cccc} 1 & 0 & 4 & 1 & 0 & 0\\ 1 & 1 & 6 & 0 & 1 & 0 \\ -3 & 0 & -10 & 0 & 0 & 1 \end{array}\right] \) \( \overset{\overset{R_2 \rightarrow R_2 - R_1}{R_3 \rightarrow R_3 + 3R_1}}{\rightarrow} \) \( \left[\begin{array}{ccc|cccc} 1 & 0 & 4 & 1 & 0 & 0\\ 0 & 1 & 2 & -1 & 1 & 0 \\ 0 & 0 & 2 & 3 & 0 & 1 \end{array}\right] \)

      \( \overset{R_3 \rightarrow \frac{1}{2}R_3}{\rightarrow} \) \( \left[\begin{array}{ccc|cccc} 1 & 0 & 4 & 1 & 0 & 0\\ 0 & 1 & 2 & -1 & 1 & 0 \\ 0 & 0 & 1 & \frac{3}{2} & 0 & \frac{1}{2} \end{array}\right] \) \( \overset{\overset{R_1 \rightarrow R_1 - 4R_3}{R_2 \rightarrow R_2 - 2R_3}}{\rightarrow} \) \( \left[\begin{array}{ccc|cccc} 1 & 0 & 0 & -5 & 0 & -2\\ 0 & 1 & 0 & -4 & 1 & -1 \\ 0 & 0 & 1 & \frac{3}{2} & 0 & \frac{1}{2} \end{array}\right] \)

    The inverse matrix is just the right hand side of the final augmented matrix

                    \( A^{-1} = \begin{pmatrix} 5 & 0 & -2 \\ -4 & 1 & -1  \\ \frac{3}{2} & 0 & \frac{1}{2} \end{pmatrix}  \)

    This example demonstrates that if A is row equivalent to the identity matrix then A is nonsingular.


    Linear Systems and Inverses

    We can use the inverse of a matrix to solve linear systems.  Suppose that

            Ax  =  b

    Then just as we divide by a coefficient to isolate x, we can apply A-1 to both sides to isolate the x

            A-1Ax  =  A-1b

            Ix  =  A-1b        x  =  A-1b

     

    Example

    Solve

            x + 4z  =  2
            x + y + 6z  =  3
            -3x - 10z  =  4

    Solution

    We put this system in matrix form

           Ax  =  b

    with

       \( A = \begin{pmatrix} 1 & 0 & 4 \\ 1 & 1 & 6  \\ -3 & 0 & -10 \end{pmatrix}  \)    \( b = \begin{pmatrix} 2  \\ 3  \\ 4 \end{pmatrix}  \)

    The solution is

            x  =  A-1 b

    We have already computed the inverse.  We arrive at

       \( x = A^{-1}b = \begin{pmatrix} -5 & 0 & -2 \\ -4 & 1 & -1  \\ \frac{3}{2} & 0 & \frac{1}{2} \end{pmatrix}  \)\( \begin{pmatrix} 2  \\ 3  \\ 4 \end{pmatrix}  \) =  \( \begin{pmatrix} -18  \\ -9  \\ 5 \end{pmatrix}  \)

            

    The solution is

            x  =  -18        y  =  -9        z  =  5


    Notice that if b is the zero vector, then

            Ax  =  0

    can be solved by

            x  =  A-10  =  0

    This demonstrates a theorem


    Theorem of Nonsingular Equivalences

    The Following Are Equivalent (TFAE)

    1. A is nonsingular
       
    2. Ax  =  0 has only the trivial solution
       
    3. A is row equivalent to I
       
    4. The linear system Ax  =  b has a unique solution for every n x 1 matrix b


    Back to the Matrices and Applications Home Page

     

     

    The Inverse of a Matrix is shared under a CC BY license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?