Skip to main content
Mathematics LibreTexts

2.4E: Matrix Multiplication Exercises

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

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

    \( \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{\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}\)

    Exercises for 1

    solutions

    2

    Compute the following matrix products.

    \(\left[ \begin{array}{rr} 1 & 3 \\ 0 & -2 \end{array} \right] \left[ \begin{array}{rr} 2 & -1 \\ 0 & 1 \end{array} \right]\) \(\left[ \begin{array}{rrr} 1 & -1 & 2 \\ 2 & 0 & 4 \end{array} \right] \left[ \begin{array}{rrr} 2 & 3 & 1 \\ 1 & 9 & 7 \\ -1 & 0 & 2 \end{array} \right]\) \(\left[ \begin{array}{rrr} 5 & 0 & -7 \\ 1 & 5 & 9 \end{array} \right] \left[ \begin{array}{r} 3 \\ 1 \\ -1 \\ \end{array} \right]\) \(\left[ \begin{array}{rrr} 1 & 3 & -3 \end{array} \right] \left[ \begin{array}{rr} 3 & 0 \\ -2 & 1 \\ 0 & 6 \end{array} \right]\) \(\left[ \begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{rr} 3 & -2 \\ 5 & -7 \\ 9 & 7 \end{array} \right]\) \(\left[ \begin{array}{rrr} 1 & -1 & 3 \end{array} \right] \left[ \begin{array}{r} 2 \\ 1 \\ -8 \end{array} \right]\) \(\left[ \begin{array}{r} 2 \\ 1 \\ -7 \end{array} \right] \left[ \begin{array}{rrr} 1 & -1 & 3 \end{array} \right]\) \(\left[ \begin{array}{rr} 3 & 1 \\ 5 & 2 \end{array} \right] \left[ \begin{array}{rr} 2 & -1 \\ -5 & 3 \end{array} \right]\) \(\left[ \begin{array}{rrr} 2 & 3 & 1 \\ 5 & 7 & 4 \end{array} \right] \left[ \begin{array}{ccc} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{array} \right]\) \(\left[ \begin{array}{ccc} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{array} \right] \left[ \begin{array}{ccc} a^\prime & 0 & 0 \\ 0 & b^\prime & 0 \\ 0 & 0 & c^\prime \end{array} \right]\)

    1. \(\left[ \begin{array}{rrr} -1 & -6 & -2 \\ 0 & 6 & 10 \end{array} \right]\)
    2. \(\left[ \begin{array}{rr} -3 & -15 \end{array} \right]\)
    3. \(\left[ -23 \right]\)
    4. \(\left[ \begin{array}{rr} 1 & 0 \\ 0 & 1 \end{array} \right]\)
    5. \(\left[ \begin{array}{rrr} aa^\prime & 0 & 0 \\ 0 & bb^\prime & 0 \\ 0 & 0 & cc^\prime \end{array} \right]\)

    In each of the following cases, find all possible products \(A^{2}\), \(AB\), \(AC\), and so on.

    1. \(A = \left[ \begin{array}{rrr} 1 & 2 & 3 \\ -1 & 0 & 0 \end{array} \right]\), \(B = \left[ \begin{array}{rr} 1 & -2 \\ \frac{1}{2} & 3 \end{array} \right]\),
      \(C = \left[ \begin{array}{rr} -1 & 0 \\ 2 & 5 \\ 0 & 3 \end{array} \right]\)

    2. \(A = \left[ \begin{array}{rrr} 1 & 2 & 4 \\ 0 & 1 & -1 \end{array} \right]\), \(B = \left[ \begin{array}{rr} -1 & 6 \\ 1 & 0 \end{array} \right]\),
      \(C = \left[ \begin{array}{rr} 2 & 0 \\ -1 & 1 \\ 1 & 2 \end{array} \right]\)

    1. \(BA = \left[ \begin{array}{rrr} -1 & 4 & -10 \\ 1 & 2 & 4 \end{array} \right]\), \(B^{2} = \left[ \begin{array}{rr} 7 & -6 \\ -1 & 6 \end{array} \right]\), \(CB = \left[ \begin{array}{rr} -2 & 12 \\ 2 & -6 \\ 1 & 6 \end{array} \right]\)
      \(AC = \left[ \begin{array}{rr} 4 & 10 \\ -2 & -1 \end{array} \right]\), \(CA = \left[ \begin{array}{rrr} 2 & 4 & 8 \\ -1 & -1 & -5 \\ 1 & 4 & 2 \end{array} \right]\)

    Find \(a\), \(b\), \(a_{1}\), and \(b_{1}\) if:

    1. \(\left[ \begin{array}{cc} a & b \\ a_{1} & b_{1} \end{array} \right] \left[ \begin{array}{rr} 3 & -5 \\ -1 & 2 \end{array} \right] = \left[ \begin{array}{rr} 1 & -1 \\ 2 & 0 \end{array} \right]\)
    2. \(\left[ \begin{array}{rr} 2 & 1 \\ -1 & 2 \end{array} \right] \left[ \begin{array}{cc} a & b \\ a_{1} & b_{1} \end{array} \right] = \left[ \begin{array}{rr} 7 & 2 \\ -1 & 4 \end{array} \right]\)
    1. \((a, b, a_{1}, b_{1}) = (3, 0, 1, 2)\)

    Verify that \(A^{2} - A - 6I = 0\) if:

    \(\left[ \begin{array}{rr} 3 & -1 \\ 0 & -2 \end{array} \right]\) \(\left[ \begin{array}{rr} 2 & 2 \\ 2 & -1 \end{array} \right]\)

    1. \(A^{2} - A - 6I = \left[ \begin{array}{rr} 8 & 2 \\ 2 & 5 \end{array} \right] - \left[ \begin{array}{rr} 2 & 2 \\ 2 & -1 \end{array} \right] - \left[ \begin{array}{rr} 6 & 0 \\ 0 & 6 \end{array} \right] = \left[ \begin{array}{rr} 0 & 0 \\ 0 & 0 \end{array} \right]\)

    [ex:ex2_3_5]

    Given \(A = \left[ \begin{array}{rr} 1 & -1 \\ 0 & 1 \end{array} \right]\), \(B = \left[ \begin{array}{rrr} 1 & 0 & -2 \\ 3 & 1 & 0 \end{array} \right]\),
    \(C = \left[ \begin{array}{rr} 1 & 0 \\ 2 & 1 \\ 5 & 8 \end{array} \right]\), and \(D = \left[ \begin{array}{rrr} 3 & -1 & 2 \\ 1 & 0 & 5 \end{array} \right]\), verify the following facts from Theorem [thm:003469].

    \(A(B - D) = AB - AD\) \(A(BC) = (AB)C\) \((CD)^{T} = D^{T}C^{T}\)

    1. \(A(BC) = \left[ \begin{array}{rr} 1 & -1 \\ 0 & 1 \end{array} \right] \left[ \begin{array}{rr} -9 & -16 \\ 5 & 1 \end{array} \right] = \left[ \begin{array}{rr} -14 & -17 \\ 5 & 1 \end{array} \right] = \left[ \begin{array}{rrr} -2 & -1 & -2 \\ 3 & 1 & 0 \end{array} \right] \left[ \begin{array}{rr} 1 & 0 \\ 2 & 1 \\ 5 & 8 \end{array} \right] = (AB)C\)

    Let \(A\) be a \(2 \times 2\) matrix.

    1. If \(A\) commutes with \(\left[ \begin{array}{rr} 0 & 1 \\ 0 & 0 \end{array} \right]\), show that
      \(A = \left[ \begin{array}{rr} a & b \\ 0 & a \end{array} \right]\) for some \(a\) and \(b\).

    2. If \(A\) commutes with \(\left[ \begin{array}{rr} 0 & 0 \\ 1 & 0 \end{array} \right]\), show that
      \(A = \left[ \begin{array}{rr} a & 0 \\ c & a \end{array} \right]\) for some \(a\) and \(c\).

    3. Show that \(A\) commutes with every \(2 \times 2\) matrix if and only if \(A = \left[ \begin{array}{rr} a & 0 \\ 0 & a \end{array} \right]\) for some \(a\).
    1. If \(A = \left[ \begin{array}{rr} a & b \\ c & d \end{array} \right]\) and \(E = \left[ \begin{array}{rr} 0 & 0 \\ 1 & 0 \end{array} \right]\), compare entries an \(AE\) and \(EA\).
    1. If \(A^{2}\) can be formed, what can be said about the size of \(A\)?
    2. If \(AB\) and \(BA\) can both be formed, describe the sizes of \(A\) and \(B\).
    3. If \(ABC\) can be formed, \(A\) is \(3 \times 3\), and \(C\) is \(5 \times 5\), what size is \(B\)?
    1. \(m \times n\) and \(n \times m\) for some \(m\) and \(n\)
    1. Find two \(2 \times 2\) matrices \(A\) such that \(A^{2} = 0\).
    2. Find three \(2 \times 2\) matrices \(A\) such that (i) \(A^{2} = I\); (ii) \(A^{2} = A\).
    3. Find \(2 \times 2\) matrices \(A\) and \(B\) such that \(AB = 0\) but \(BA \neq 0\).
      1. \(\left[ \begin{array}{rr} 1 & 0 \\ 0 & 1 \end{array} \right]\), \(\left[ \begin{array}{rr} 1 & 0 \\ 0 & -1 \end{array} \right]\), \(\left[ \begin{array}{rr} 1 & 1 \\ 0 & -1 \end{array} \right]\)
      2. \(\left[ \begin{array}{rr} 1 & 0 \\ 0 & 0 \end{array} \right]\), \(\left[ \begin{array}{rr} 1 & 0 \\ 0 & 1 \end{array} \right]\), \(\left[ \begin{array}{rr} 1 & 1 \\ 0 & 0 \end{array} \right]\)

    Write \(P = \left[ \begin{array}{rrr} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{array} \right]\), and let \(A\) be \(3 \times n\) and \(B\) be \(m \times 3\).

    1. Describe \(PA\) in terms of the rows of \(A\).
    2. Describe \(BP\) in terms of the columns of \(B\).

    Let \(A\), \(B\), and \(C\) be as in Exercise [ex:ex2_3_5]. Find the \((3, 1)\)-entry of \(CAB\) using exactly six numerical multiplications.

    Compute \(AB\), using the indicated block partitioning.

    \[A = \left[ \begin{array}{rr|rr} 2 & -1 & 3 & 1 \\ 1 & 0 & 1 & 2 \\ \hline 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right] \quad B = \left[ \begin{array}{rr|r} 1 & 2 & 0 \\ -1 & 0 & 0 \\ \hline 0 & 5 & 1 \\ 1 & -1 & 0 \end{array} \right] \nonumber \]

    In each case give formulas for all powers \(A, A^{2}, A^{3}, \dots\) of \(A\) using the block decomposition indicated.

    1. \(A = \left[ \begin{array}{r|rr} 1 & 0 & 0 \\ \hline 1 & 1 & -1\\ 1 & -1 & 1 \end{array} \right]\)
    2. \(A = \left[ \begin{array}{rr|rr} 1 & -1 & 2 & -1 \\ 0 & 1 & 0 & 0 \\ \hline 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & 1 \end{array} \right]\)
    1. \(A^{2k} = \left[ \begin{array}{rc|rr} 1 & -2k & 0 & 0 \\ 0 & 1 & 0 & 0 \\ \hline 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right]\) for \(k = 0, 1, 2, \dots\),
      \(A^{2k + 1} = A^{2k}A = \left[ \begin{array}{rc|rr} 1 & -(2k + 1) & 2 & -1 \\ 0 & 1 & 0 & 0 \\ \hline 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & 1 \end{array} \right]\) for \(k = 0, 1, 2, \dots\)

    Compute the following using block multiplication (all blocks are \(k \times k\)).

    \(\left[ \begin{array}{rr} I & X \\ -Y & I \end{array} \right] \left[ \begin{array}{rr} I & 0 \\ Y & I \end{array} \right]\) \(\left[ \begin{array}{rr} I & X \\ 0 & I \end{array} \right] \left[ \begin{array}{rr} I & -X \\ 0 & I \end{array} \right]\) \(\left[ \begin{array}{cc} I & X \end{array} \right] \left[ \begin{array}{cc} I & X \end{array} \right]^{T}\) \(\left[ \begin{array}{cc} I & X^{T} \end{array} \right] \left[ \begin{array}{cc} -X & I \end{array} \right]^{T}\) \(\left[ \begin{array}{cc} I & X \\ 0 & -I \end{array} \right]^{n}\) any \(n \geq 1\) \(\left[ \begin{array}{cc} 0 & X \\ I & 0 \end{array} \right]^{n}\) any \(n \geq 1\)

    1. \(\left[ \begin{array}{cc} I & 0 \\ 0 & I \end{array} \right] = I_{2k}\)
    2. \(0_{k}\)
    3. \(\left[ \begin{array}{cc} X^{m} & 0 \\ 0 & X^{m} \end{array} \right]\) if \(n = 2m\); \(\left[ \begin{array}{cc} 0 & X^{m + 1} \\ X^{m} & 0 \end{array} \right]\) if \(n = 2m + 1\)

    Let \(A\) denote an \(m \times n\) matrix.

    1. If \(AX = 0\) for every \(n \times 1\) matrix \(X\), show that \(A = 0\).
    2. If \(YA = 0\) for every \(1 \times m\) matrix \(Y\), show that \(A = 0\).
    1. If \(Y\) is row \(i\) of the identity matrix \(I\), then \(YA\) is row \(i\) of \(IA = A\).
    1. If \(U = \left[ \begin{array}{rr} 1 & 2 \\ 0 & -1 \end{array} \right]\), and \(AU = 0\), show that \(A = 0\).
    2. Let \(U\) be such that \(AU = 0\) implies that \(A = 0\). If \(PU = QU\), show that \(P = Q\).

    Simplify the following expressions where \(A\), \(B\), and \(C\) represent matrices.

    1. \(A(3B - C) + (A - 2B)C + 2B(C + 2A)\)
    2. \(A(B + C - D) + B(C - A + D) - (A + B)C \\ + (A - B)D\)
    3. \(AB(BC - CB) + (CA - AB)BC + CA(A - B)C\)
    4. \((A - B)(C - A) + (C - B)(A - C) + (C - A)^{2}\)
    1. \(AB - BA\)
    2. \(0\)

    If \(A = \left[ \begin{array}{cc} a & b \\ c & d \end{array} \right]\) where \(a \neq 0\), show that \(A\) factors in the form \(A = \left[ \begin{array}{cc} 1 & 0 \\ x & 1 \end{array} \right] \left[ \begin{array}{cc} y & z \\ 0 & w \end{array} \right]\).

    If \(A\) and \(B\) commute with \(C\), show that the same is true of:

    \(A + B\) \(kA\), \(k\) any scalar

    1. \((kA)C = k(AC) = k(CA) = C(kA)\)

    If \(A\) is any matrix, show that both \(AA^{T}\) and \(A^{T}A\) are symmetric.

    If \(A\) and \(B\) are symmetric, show that \(AB\) is symmetric if and only if \(AB = BA\).

    We have \(A^{T} = A\) and \(B^{T} = B\), so \((AB)^{T} = B^{T}A^{T} = BA\). Hence \(AB\) is symmetric if and only if \(AB = BA\).

    If \(A\) is a \(2 \times 2\) matrix, show that \(A^{T}A = AA^{T}\) if and only if \(A\) is symmetric or \(A = \left[ \begin{array}{cc} a & b \\ -b & a \end{array} \right]\) for some \(a\) and \(b\).

    1. Find all symmetric \(2 \times 2\) matrices \(A\) such that \(A^{2} = 0\).
    2. Repeat (a) if \(A\) is \(3 \times 3\).
    3. Repeat (a) if \(A\) is \(n \times n\).
    1. \(A = 0\)

    Show that there exist no \(2 \times 2\) matrices \(A\) and \(B\) such that \(AB - BA = I\). [Hint: Examine the \((1, 1)\)- and \((2, 2)\)-entries.]

    Let \(B\) be an \(n \times n\) matrix. Suppose \(AB = 0\) for some nonzero \(m \times n\) matrix \(A\). Show that no \(n \times n\) matrix \(C\) exists such that \(BC = I\).

    If \(BC = I\), then \(AB = 0\) gives \(0 = 0C = (AB)C = A(BC) = AI = A\), contrary to the assumption that \(A \neq 0\).

    An autoparts manufacturer makes fenders, doors, and hoods. Each requires assembly and packaging carried out at factories: Plant 1, Plant 2, and Plant 3. Matrix \(A\) below gives the number of hours for assembly and packaging, and matrix \(B\) gives the hourly rates at the three plants. Explain the meaning of the \((3, 2)\)-entry in the matrix \(AB\). Which plant is the most economical to operate? Give reasons.

    lccll & Assembly & Packaging & &
    \(\begin{array}{l} \mbox{Fenders} \\ \mbox{Doors} \\ \mbox{Hoods} \end{array}\) & & \(=\) & \(A\)

    For the directed graph below, find the adjacency matrix \(A\), compute \(A^{3}\), and determine the number of paths of length \(3\) from \(v_{1}\) to \(v_{4}\) and from \(v_{2}\) to \(v_{3}\).

    \(3\) paths \(v_{1} \rightarrow v_{4}\), \(0\) paths \(v_{2} \rightarrow v_{3}\)

    In each case either show the statement is true, or give an example showing that it is false.

    1. If \(A^{2} = I\), then \(A = I\).
    2. If \(AJ = A\), then \(J = I\).
    3. If \(A\) is square, then \((A^{T})^{3} = (A^{3})^{T}\).
    4. If \(A\) is symmetric, then \(I + A\) is symmetric.
    5. If \(AB = AC\) and \(A \neq 0\), then \(B = C\).
    6. If \(A \neq 0\), then \(A^{2} \neq 0\).
    7. If \(A\) has a row of zeros, so also does \(BA\) for all \(B\).
    8. If \(A\) commutes with \(A + B\), then \(A\) commutes with \(B\).
    9. If \(B\) has a column of zeros, so also does \(AB\).
    10. If \(AB\) has a column of zeros, so also does \(B\).
    11. If \(A\) has a row of zeros, so also does \(AB\).
    12. If \(AB\) has a row of zeros, so also does \(A\).
    1. False. If \(A = \left[ \begin{array}{rr} 1 & 0 \\ 0 & 0 \end{array} \right] = J\), then \(AJ = A\) but \(J \neq I\).
    2. True. Since \(A^{T} = A\), we have \((I + AT = I^{T} + A^{T} = I + A\).
    3. False. If \(A = \left[ \begin{array}{rr} 0 & 1 \\ 0 & 0 \end{array} \right]\), then \(A \neq 0\) but \(A^{2} = 0\).
    4. True. We have \(A(A + B) = (A + B)A\); that is, \(A^{2} + AB = A^{2} + BA\). Subtracting \(A^{2}\) gives \(AB = BA\).
    5. False. \(A = \left[ \begin{array}{rr} 1 & -2 \\ 2 & 4 \end{array} \right]\), \(B = \left[ \begin{array}{rr} 2 & 4 \\ 1 & 2 \end{array} \right]\)
    6. False. See (j).
    1. If \(A\) and \(B\) are \(2 \times 2\) matrices whose rows sum to \(1\), show that the rows of \(AB\) also sum to \(1\).
    2. Repeat part (a) for the case where \(A\) and \(B\) are \(n \times n\).
    1. If \(A = \left[ a_{ij} \right]\) and \(B = \left[ b_{ij} \right]\) and \(\sum_{j}a_{ij} = 1 = \sum_{j}b_{ij}\), then the \((i, j)\)-entry of \(AB\) is \(c_{ij} = \sum_{k}a_{ik}b_{kj}\), whence \(\sum_{j}c_{ij} = \sum_{j}\sum_{k}a_{ik}b_{kj} = \sum_{k}a_{ik}(\sum_{j}b_{kj}) = \sum_{k}a_{ik} = 1\). Alternatively: If \(\mathbf{e} = (1, 1, \dots, 1)\), then the rows of \(A\) sum to \(1\) if and only if \(A\mathbf{e} = \mathbf{e}\). If also \(B\mathbf{e} = \mathbf{e}\) then \((AB)\mathbf{e} = A(B\mathbf{e}) = A\mathbf{e} = \mathbf{e}\).

    Let \(A\) and \(B\) be \(n \times n\) matrices for which the systems of equations \(A\mathbf{x} = \mathbf{0}\) and \(B\mathbf{x} = \mathbf{0}\) each have only the trivial solution \(\mathbf{x} = \mathbf{0}\). Show that the system \((AB)\mathbf{x} = \mathbf{0}\) has only the trivial solution.

    The trace of a square matrix \(A\), denoted \(tr \;A\), is the sum of the elements on the main diagonal of \(A\). Show that, if \(A\) and \(B\) are \(n \times n\) matrices:

    \(\func{tr}(A + B) = tr \;A + tr \;B\). \(\func{tr}(kA) = k \func{tr}(A)\) for any number \(k\). \(\func{tr}(A^{T}) = \func{tr}(A)\). \(\func{tr}(AB) = \func{tr}(BA)\). \(\func{tr}(AA^{T})\) is the sum of the squares of all entries of \(A\).

    1. If \(A = \left[ a_{ij} \right]\), then \(\func{tr}(kA) = \func{tr}\left[ ka_{ij} \right] = \sum_{i=1}^{n} ka_{ii} = k\sum_{i=1}^{n} a_{ii} = k \func{tr}(A)\).
    2. Write \(A^{T} = \left[ a_{ij}^\prime \right]\), where \(a_{ij}^\prime = a_{ji}\). Then \(AA^{T} = \left( \sum_{k=1}^{n} a_{ik}a_{kj}^\prime \right)\), so \(\func{tr}(AA^{T}) = \sum_{i=1}^{n} \left[ \sum_{k=1}^{n} a_{ik}a_{ki}^\prime \right] = \sum_{i=1}^{n} \sum_{k=1}^{n} a_{ik}^{2}\).

    Show that \(AB - BA = I\) is impossible.

    [Hint: See the preceding exercise.]

    A square matrix \(P\) is called an idempotent if \(P^{2} = P\). Show that:

    1. \(0\) and \(I\) are idempotents.
    2. \(\left[ \begin{array}{rr} 1 & 1 \\ 0 & 0 \end{array} \right]\), \(\left[ \begin{array}{rr} 1 & 0 \\ 1 & 0 \end{array} \right]\), and \(\frac{1}{2} \left[ \begin{array}{rr} 1 & 1 \\ 1 & 1 \end{array} \right]\), are idempotents.
    3. If \(P\) is an idempotent, so is \(I - P\). Show further that \(P(I - P) = 0\).
    4. If \(P\) is an idempotent, so is \(P^{T}\).
    5. If \(P\) is an idempotent, so is \(Q = P + AP - PAP\) for any square matrix \(A\) (of the same size as \(P\)).
    6. If \(A\) is \(n \times m\) and \(B\) is \(m \times n\), and if \(AB = I_{n}\), then \(BA\) is an idempotent.
    1. Observe that \(PQ = P^{2} + PAP - P^{2}AP = P\), so \(Q^{2} = PQ + APQ - PAPQ = P + AP - PAP = Q\).

    Let \(A\) and \(B\) be \(n \times n\) diagonal matrices (all entries off the main diagonal are zero).

    1. Show that \(AB\) is diagonal and \(AB = BA\).
    2. Formulate a rule for calculating \(XA\) if \(X\) is \(m \times n\).
    3. Formulate a rule for calculating \(AY\) if \(Y\) is \(n \times k\).

    If \(A\) and \(B\) are \(n \times n\) matrices, show that:

    1. \(AB = BA\) if and only if

      \[(A + B)^{2} = A^{2} + 2AB + B^{2} \nonumber \]

    2. \(AB = BA\) if and only if

      \[(A + B)(A - B) = (A - B)(A + B) \nonumber \]

    1. \((A + B)(A - B) = A^{2} - AB + BA - B^{2}\), and \((A - B)(A + B) = A^{2} + AB - BA - B^{2}\). These are equal if and only if \(-AB + BA = AB - BA\); that is, \(2BA = 2AB\); that is, \(BA = AB\).

    In Theorem [thm:003584], prove

    part 3; part 5.

    1. \((A + B)(A - B) = A^{2} - AB + BA - B^{2}\) and \((A - B)(A + B) = A^{2} - BA + AB - B^{2}\). These are equal if and only if \(-AB + BA = -BA + AB\), that is \(2AB = 2BA\), that is \(AB = BA\).

    2.4E: Matrix Multiplication Exercises is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?