# Section2Matrix Multiplication (NM)¶ permalink

These section closely follows Lecture 1 of Trefethen and Bau's Numerical Linear Algebra. The first 5 lectures are freely available from the first author's home page. The summary below should be read in the context of those notes. I don't reproduce their text, just repeat the examples done in class.

Some of the following exercises are taken from Ilse Ipsen's Numerical Matrix Analysis. Full text is available online through the library portal.

# Subsection2.1Matrix vector multiplication

If \(A\) is an \(m \times n\) matrix, and \(x\) and \(b\) are \(m\)-vectors, with given by \(b = A x\text{,}\) then

\begin{equation*} b_i = \sum_{j=1}^N a_{ij} x_j. \end{equation*}# Subsection2.2Matrix-matrix multiplication

If \(A\) is a \(m \times n\)-matrix, \(C\) is a \(n \times p\) matrix, and \(B=AC\text{,}\) then \(B\) is the \(m \times p\) matrix given by

\begin{equation*} b_{ij} = \sum_{k=1}^n a_{ik}c_{kj}. \end{equation*}But in keeping with the ideas above, let us consider the formula for column \(j\) of \(B\text{:}\)

\begin{equation*} b_j = \sum_{k=1}^n c_{kj} {a_k}. \end{equation*}So column \(j\) of \(B\) is a linear combination of all the columns of \(A\text{,}\) with the coefficients taken from column \(j\) of \(C\text{.}\)

Other examples that are worth considering, include computing the inner and outer products of the vectors \((a, b, c)^T\) and \((d,e,f)^T\text{.}\)

Please also read Section 1.7 of [1] for more on four different “views” of matrix-matrix multiplication.

# Subsection2.3Exercises

##### Exercise2.3

Use the “column version” of matrix-matrix multiplication to show that the product of two lower-triangular matrices is lower-triangular.

We partition the identity matrix into columns as

\begin{equation*} I= (e_1 | e_2 | \cdots | e_n). \end{equation*}That is,

\begin{equation*} e_1 = \begin{pmatrix}1 \\ 0 \\ \vdots \\ 0 \\ 0\end{pmatrix} \quad e_2 = \begin{pmatrix}0 \\ 1 \\ \vdots \\ 0 \\ 0 \end{pmatrix} \quad \dots \quad e_n = \begin{pmatrix}0 \\ 0 \\ \vdots \\ 0 \\ 1 \end{pmatrix} \end{equation*}##### Exercise2.4

- Show that \(Ae_j\) is the \(j\)th column on \(A\text{.}\)
- Let \(v\) be the vector \(v=(1,1,\dots,1)\text{.}\) What is \(A v\text{?}\)

The next one is from [1]. To answer it you need to know that a matrix \(A\) is

- involutory if \(A^2=I\text{,}\)
- nilpotent if \(A^k=0\) for some integer \(k>0\)
- a
*projector*(also known as*idempotent*) if \(A^2=A\)

##### Exercise2.5

- Which is the only matrix that is both a projector and involutory?
- Which is the only matrix that is both idempotent and nilpotent?
- Prove that if \(A\) is a projector, then so too is \(I-A\text{.}\)
- Prove that if \(A\) and \(B\) are both projectors, and \(AB=BA\text{,}\) them \(AB\) is also a projector.
- Prove that \(A\) is involutory if and only if \((I-A)(I+A)=0\text{.}\)
- Show that if \(A\) is involutory \(B=\frac{1}{2}(I+A)\text{,}\) then \(B\) is a projector.

##### Exercise2.6

A matrix \(L \in \Rmm\) is *lower triangular* if \(l_{ij}=0\) when \(i \lt j\text{.}\) If, in addition, \(l_{ii}=1\text{,}\) then it is *unit lower triangular*. Show that the product of two unit lower triangular matrices is lower triangular.

Show that if we write the unit lower triangular matrix \(L\) as \(L=I+N\text{,}\) then \(N\) is nilpotent.

Show that

\begin{equation*} L^{-1} = I -N +N^2 -N^3 + \dots. \end{equation*}Deduce that \(L^{-1}\) is itself a unit lower triangular matrix.