Skip to main content

Subsection 4.6.1 Additional homework

Homework 4.6.1.1.

Let \(A \in \mathbb{R}^{m \times n} \) and \(x \in \mathbb{R}^n \text{.}\) Then \(( A x )^T = x^T A^T\text{.}\) \\ \mbox{~} \hfill Always/Sometimes/Never

Answer

ALWAYS

Why?

Solution
\begin{equation*} \begin{array}{l} ( A x )^T \\ ~~~~ = ~~~~ \lt \mbox{ Partition into rows } \gt \\ ( \left( \begin{array}{c} \tilde{a}_0^T \\ \hline \tilde{a})_1^T \\ \hline \vdots \\ \hline \tilde{a})_{m-1}^T \end{array} \right) x )^T \\ ~~~~ = ~~~~ \lt \mbox{ Matrix-vector multiplication } \gt \\ \left( \begin{array}{c} \tilde{a}_0^T x \\ \hline \tilde{a}_1^T x \\ \hline \vdots \\ \hline \tilde{a}_{m-1}^T x \end{array} \right) ^T \\ ~~~~ = ~~~~ \lt \mbox{ transpose the column vector } \gt \\ \left( \begin{array}{c | c | c | c} \tilde{a}_0^T x \amp \tilde{a}_1^T x \amp \cdots \amp \tilde{a}_{m-1}^T x \end{array} \right) \\ ~~~~ = ~~~~ \lt \mbox{ dot product commutes } \gt \\ \left( \begin{array}{c | c | c | c} x^T \tilde{a}_0 \amp x^T \tilde{a}_1 \amp \cdots \amp x^T \tilde{a}_{m-1} \end{array} \right) \\ ~~~~ = ~~~~ \lt \mbox{ special case of matrix-matrix multiplication } \gt \\ x^T \left( \begin{array}{c | c | c | c} \tilde{a}_0 \amp \tilde{a}_1 \amp \cdots \amp \tilde{a}_{m-1} \end{array} \right) \\ ~~~~ = ~~~~ \lt \mbox{ transpose the matrix } \gt \\ x^T \left( \begin{array}{c} \tilde{a}_0^T \\ \hline \tilde{a})_1^T \\ \hline \vdots \\ \hline \tilde{a})_{m-1}^T \end{array} \right)^T \\ ~~~~ = ~~~~ \lt \mbox{ unpartition the matrix } \gt \\ x^T A^T \end{array} \end{equation*}
Homework 4.6.1.2.

Our laff library has a routine laff_gemv( trans, alpha, A, x, beta, y ) that has the following property

  • laff_gemv( 'No transpose', alpha, A, x, beta, y ) computes \(y := \alpha A x + \beta y \text{.}\)

  • laff_gemv( 'Transpose', alpha, A, x, beta, y ) computes \(y := \alpha A^T x + \beta y \text{.}\)

The routine works regardless of whether \(x \) and/or \(y \) are column and/or row vectors. Our library does NOT include a routine to compute \(y^T := x^T A \text{.}\) What call could you use to compute \(y^T := x^T A \) if \(y^T \) is stored in yt and \(x^T \) in xt?

  • laff_gemv( 'No transpose', 1.0, A, xt, 0.0, yt ).

  • laff_gemv( 'No transpose', 1.0, A, xt, 1.0, yt ).

  • laff_gemv( 'Transpose', 1.0, A, xt, 1.0, yt ).

  • laff_gemv( 'Transpose', 1.0, A, xt, 0.0, yt ).

Solution

laff_gemv( 'Transpose', 1.0, A, xt, 0.0, yt ) computes \(y := A^T x \text{,}\) where \(y \) is stored in yt and \(x \) is stored in xt. To understand this, transpose both sides: \(y^T = ( A^T x )^T = x^T {A^T}^T = x^T A \text{.}\) For this reason, our laff library does not include a routine to compute \(y^T := \alpha x^T A + \beta y^T \text{.}\) You will need this next week!!!

Homework 4.6.1.3.

Let \(A = \left( \begin{array}{r r} 1 \amp -1 \\ 1 \amp -1 \end{array} \right) \text{.}\) Compute

  • \(A^2 = \)

  • \(A^3 = \)

  • For \(k \gt 1 \text{,}\) \(A^k = \)

Solution

Let \(A = \left( \begin{array}{r r} 1 \amp -1 \\ 1 \amp -1 \end{array} \right) \text{.}\) Compute

  • \(A^2 = \left( \begin{array}{r r} 0 \amp 0 \\ 0 \amp 0 \end{array} \right)\)

  • \(A^3 = \left( \begin{array}{r r} 0 \amp 0 \\ 0 \amp 0 \end{array} \right)\)

  • For \(k \gt 1 \text{,}\) \(A^k = \left( \begin{array}{r r} 0 \amp 0 \\ 0 \amp 0 \end{array} \right)\)

Homework 4.6.1.4.

Let \(A = \left( \begin{array}{r r} 0 \amp 1 \\ 1 \amp 0 \end{array} \right) \text{.}\)

  • \(A^2 = \)

  • \(A^3 = \)

  • For \(n \geq 0 \text{,}\) \(A^{2n} = \)

  • For \(n \geq 0 \text{,}\) \(A^{2n+1} = \)

Solution

Let \(A = \left( \begin{array}{r r} 0 \amp 1 \\ 1 \amp 0 \end{array} \right) \text{.}\)

  • \(A^2 = \left( \begin{array}{r r} 1 \amp 0 \\ 0 \amp 1 \end{array} \right)\)

  • \(A^3 = \left( \begin{array}{r r} 0 \amp 1 \\ 1 \amp 0 \end{array} \right)\)

  • For \(n \geq 0 \text{,}\) \(A^{2n} = \left( \begin{array}{r r} 1 \amp 0 \\ 0 \amp 1 \end{array} \right)\)

  • For \(n \geq 0 \text{,}\) \(A^{2n+1} = \left( \begin{array}{r r} 0 \amp 1 \\ 1 \amp 0 \end{array} \right)\)

Homework 4.6.1.5.

Let \(A = \left( \begin{array}{r r} 0 \amp -1 \\ 1 \amp 0 \end{array} \right) \text{.}\)

  • \(A^2 = \)

  • \(A^3 = \)

  • For \(n \geq 0 \text{,}\) \(A^{4n} = \)

  • For \(n \geq 0 \text{,}\) \(A^{4n+1} = \)

Solution

Let \(A = \left( \begin{array}{r r} 0 \amp -1 \\ 1 \amp 0 \end{array} \right) \text{.}\)

  • \(A^2 = \left( \begin{array}{r r} -1 \amp 0 \\ 0 \amp -1 \end{array} \right)\)

  • \(A^3 = \left( \begin{array}{r r} 0 \amp 1 \\ -1 \amp 0 \end{array} \right)\)

  • For \(n \geq 0 \text{,}\) \(A^{4n} = \left( \begin{array}{r r} 1 \amp 0 \\ 0 \amp 1 \end{array} \right)\)

  • For \(n \geq 0 \text{,}\) \(A^{4n+1} = \left( \begin{array}{r r} 0 \amp -1 \\ 1 \amp 0 \end{array} \right)\)

Homework 4.6.1.6.

Let \(A \) be a square matrix with \(A A = 0 \text{.}\) (\(A A \) is often written as \(A^2 \text{.}\))

ALWAYS/SOMETIMES/NEVER: \(A \) is a zero matrix.

Answer

SOMETIMES

Why?

Solution

If \(A = 0 \) then certainly \(A^2 = 0 \text{.}\)

However

\begin{equation*} \left( \begin{array}{r r} 1 \amp 1 \\ -1 \amp -1 \end{array} \right) \left( \begin{array}{r r} 1 \amp 1 \\ -1 \amp -1 \end{array} \right) = \left( \begin{array}{r r} 0 \amp 0 \\ 0 \amp 0 \end{array} \right) . \end{equation*}

Hence there are examples with \(A \neq 0 \) such that \(A^2 = 0 \text{.}\)

This may be counter intuitive since if \(\alpha \) is a scalar, then \(\alpha^2 = 0 \) only if \(\alpha = 0 \text{.}\) So, one of the points of this exercise is to make you skeptical about "facts" about scalar multiplications that you may try to transfer to matrix-matrix multiplication.}

Homework 4.6.1.7.

TRUE/FALSE: There exists a real valued matrix \(A \) such that \(A^2 = -I \text{.}\) (Recall: \(I \) is the identity)

Answer

TRUE

Why?

Solution

Example: \(A = \left( \begin{array}{r r} 0 \amp 1 \\ -1 \amp 0 \end{array} \right) \text{.}\)

This is likely counter intuitive since if \(\alpha \) is a real scalar, then \(\alpha^2 \neq -1 \text{.}\)

Homework 4.6.1.8.

TRUE/FALSE: There exists a matrix \(A \) that is not diagonal such that \(A^2 = I \text{.}\)

Answer

TRUE

Why?

Solution

An examples of a matrices \(A \) that is not diagonal yet \(A^2 = I \text{:}\) \(A = \left( \begin{array}{r r} 0 \amp 1 \\ 1 \amp 0 \end{array} \right) \text{.}\)

This may be counter intuitive since if \(\alpha \) is a real scalar, then \(\alpha^2 = 1 \) only if \(\alpha = 1 \) or \(\alpha = -1 \text{.}\) Also, if a matrix is \(1 \times 1 \text{,}\) then it is automatically diagonal, so you cannot look at \(1 \times 1 \) matrices for inspiration for this problem.