Skip to main content
Mathematics LibreTexts

13.1: The Inverse Matrix (aka A^-1)

  • Page ID
    65482
  • \( \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}\)

    For some (not all) square matrices \(A\), there exists a special matrix called the Inverse Matrix, which is typically written as \(A^{-1}\) and when multiplied by \(A\) results in the identity matrix \(I\):

    \[ A^{-1}A = AA^{-1} = I \nonumber \]

    Some properties of an Inverse Matrix include:

    1. \((A^{-1})^{-1} = A\)
    2. \((cA)^{-1} = \frac{1}{c}A^{-1}\)
    3. \((AB)^{-1} = B^{-1}A^{-1}\)
    4. \((A^n)^{-1} = (A^{-1})^n\)
    5. \((A^\top)^{-1} = (A^{-1})^\top\) here \(A^\top\) is the tranpose of the matrix \(A\).

    If you know that \(A^{−1}\) is an inverse matrix to \(A\), then solving \(Ax=b\) is simple, just multiply both sides of the equation by \(A^{−1}\) and you get:

    \[A^{-1}Ax = A^{-1}b \nonumber \]

    If we apply the definition of the inverse matrix from above we can reduce the equation to:

    \[Ix = A^{-1}b \nonumber \]

    We know \(I\) times \(x\) is just \(x\) (definition of the identity matrix), so this further reduces to:

    \[x = A^{-1}b \nonumber \]

    To conclude, solving \(Ax=b\) when you know \(A^{-1}\) is really simple. All you need to do is multiply \(A^{-1}\) by \(b\) and you know \(x\).

    Do This

    Find a Python numpy command that will calculate the inverse of a matrix and use it invert the following matrix A. Store the inverse in a new matirx named A_inv

    import numpy as np
    import sympy as sym
    sym.init_printing(use_unicode=True) # Trick to make matrixes look nice in jupyter
    
    A = np.matrix([[1, 2, 3], [4, 5, 6], [7,8,7]])
    
    sym.Matrix(A)
    #put your answer to the above question here.

    Lets check your answer by multiplying A by A_inv.

    A * A_inv
    np.allclose(A*A_inv, [[1,0,0],[0,1,0],[0,0,1]])
    Question

    What function did you use to find the inverse of matrix \(A\)?

    How do we create an inverse matrix?

    From previous assignments, we learned that we could string together a bunch of Elementary Row Operations to get matrix (\(A\)) into it’s Reduced Row Echelon form. We now know that we can represent Elementary Row Operations as a sequence of Elementaary Matrices as follows:

    \[ E_n \dots E_3 E_2 E_1 A = RREF \nonumber \]

    If \(A\) reduces to the identity matrix (i.e. \(A\) is row equivalent to \(I\)), then \(A\) has an inverse and its inverse is just all of the Elementary Matrices multiplied together:

    \[ A^{-1} = E_n \dots E_3 E_2 E_1 \nonumber \]

    Consider the following matrix.

    \[ A = \left[
    \begin{matrix}
    1 & 2 \\
    4 & 6
    \end{matrix}
    \right] \nonumber \]

    A = np.matrix([[1, 2], [4,6]])

    It can be reduced into an identity matrix using the following elementary operators

    Words Elementary Matrix
    Adding \(-4\) times row 1 to row 2. \(E_1 = \left[\begin{matrix}1 & 0 \\ -4 & 1 \end{matrix}\right]\)
    Adding row 2 to row 1. \(E_2 = \left[\begin{matrix}1 & 1 \\ 0 & 1 \end{matrix}\right]\)
    Multiplying row 2 by \(-\frac{1}{2}\). \(E_3 = \left[\begin{matrix}1 & 0 \\ 0 & -\frac{1}{2} \end{matrix}\right]\)
    E1 = np.matrix([[1,0], [-4,1]])
    E2 = np.matrix([[1,1], [0,1]])
    E3 = np.matrix([[1,0],[0,-1/2]])

    We can just check that the statment seems to be true by multiplying everything out.

    E3*E2*E1*A
    matrix([[1., 0.],
            [0., 1.]])
    Do This

    Combine the above elementary Matrices to make an inverse matrix named A_inv

    # Put your answer to the above question here.
    Do This

    Verify that A_inv is an actual inverse and chech that \(AA^{-1} = I\).

    # Put your code here.
    Question

    Is an invertible matrix is always square? Why or why not?

    Question

    Is a square matrix always invertible? Why or why not?

    Question

    Describe the Reduced Row Echelon form of a square, invertible matrix.

    Question

    Is the following matrix in the Reduced Row Echelon form?

    \[\begin{split}
    \left[
    \begin{matrix}
    1 & 2 & 0 & 3 & 0 & 4 \\
    0 & 0 & 1 & 3 & 0 & 7 \\
    0 & 0 & 0 & 0 & 1 & 6 \\
    0 & 0 & 0 & 0 & 0 & 0
    \end{matrix}
    \right]
    \end{split} \nonumber \]

    Question

    If the matrix shown above is not in Reduced Row Echelon form. Name a rule that is violated?

    Question

    What is the size of the matrix described in the previous QUESTION?

    • \(4 \times 6\)
    • \(6 \times 4\)
    • \(3 \times 6\)
    • \(5 \times 3\)
    Question

    Describe the elementary row operation that is implemented by the following matrix

    \[\begin{split}
    \left[
    \begin{matrix}
    0 & 1 & 0 \\
    1 & 0 & 0 \\
    0 & 0 & 1
    \end{matrix}
    \right]
    \end{split} \nonumber \]


    This page titled 13.1: The Inverse Matrix (aka A^-1) is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Dirk Colbry via source content that was edited to the style and standards of the LibreTexts platform.

    • Was this article helpful?