BioStart Logo

Matrix Algebra and Definitions: Learning Objectives 3, 4

Question 1: Let \( A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} \) and \( B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \).
  1. Find $AB$ and $BA$.
  2. $B$ is the $3 \times 3$ identity matrix. What property of identity matrices is being shown in part (a)?
  3. Let $M \in \mathbb{R}^{m\times n}$, and let $I_n \in \mathbb{R}^{n\times n}$ denote the $n \times n$ identity matrix. Prove that $MI_n = M$.

For part (c), consider the element in the $i$-th row and $j$-th column of the product, $(MI_n)_{ij}$. By definition, this is the dot product of the $i$-th row of $M$ and the $j$-th column of $I_n$.

  1. $AB = BA = A$.
  2. This shows that the identity matrix is the multiplicative identity in matrix algebra; multiplying any matrix by it (where defined) leaves the matrix unchanged.
  3. The proof relies on the definition of matrix multiplication and the structure of the identity matrix.

a) Performing the matrix multiplication: \[ AB = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} = A \] Similarly, $BA = A$.

b) This demonstrates the key property of an identity matrix: it serves as the multiplicative identity. For any $n \times n$ matrix $A$, $AI_n = I_nA = A$.

c) Let $C = MI_n$. The element $c_{ij}$ in the $i$-th row and $j$-th column of $C$ is given by the dot product of the $i$-th row of $M$ and the $j$-th column of $I_n$. \[ c_{ij} = \sum_{k=1}^n m_{ik} (I_n)_{kj} \] The identity matrix $I_n$ has entries $(I_n)_{kj} = 1$ if $k=j$ and 0 if $k \neq j$. Therefore, in the summation, all terms are zero except for the one where $k=j$. \[ c_{ij} = m_{i1}(0) + \dots + m_{ij}(1) + \dots + m_{in}(0) = m_{ij} \] Since $c_{ij} = m_{ij}$ for all $i$ and $j$, the matrix $C$ is identical to the matrix $M$. Thus, $MI_n = M$.

Question 2: Let \( A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} \) and \( B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} \).
  1. Find $AB$ and $BA$.
  2. $B$ is a diagonal matrix. What property of diagonal matrices is being demonstrated in part (a)?

Observe how the rows and columns of A are affected when multiplied by the diagonal matrix B on the right versus on the left.

\[ AB = \begin{bmatrix} 1 & 4 & 9 \\ 2 & -14 & 15 \\ -2 & -16 & 9 \end{bmatrix}, \quad BA = \begin{bmatrix} 1 & 2 & 3 \\ 4 & -14 & 10 \\ -6 & -24 & 9 \end{bmatrix} \] Multiplication by a diagonal matrix on the right scales the columns of the other matrix. Multiplication on the left scales the rows.

a) \[ AB = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} = \begin{bmatrix} 1 & 4 & 9 \\ 2 & -14 & 15 \\ -2 & -16 & 9 \end{bmatrix} \] \[ BA = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} \begin{bmatrix} 1 & 2 & 3 \\ 2 & -7 & 5 \\ -2 & -8 & 3 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3 \\ 4 & -14 & 10 \\ -6 & -24 & 9 \end{bmatrix} \] b) This demonstrates that multiplying a matrix $A$ by a diagonal matrix $B$ on the right ($AB$) scales the columns of $A$ by the corresponding diagonal entries of $B$. Multiplying on the left ($BA$) scales the rows of $A$ by the corresponding diagonal entries of $B$.

Question 3: Let \( B = \begin{bmatrix} 8 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 4 \end{bmatrix} \).
  1. Find $B^{-1}$.
  2. What does this show concerning the inverse of a diagonal matrix?

The inverse of a diagonal matrix is found by a simple operation on its diagonal elements.

  1. \[ B^{-1} = \begin{bmatrix} 1/8 & 0 & 0 \\ 0 & 1/2 & 0 \\ 0 & 0 & 1/4 \end{bmatrix} \]
  2. The inverse of a diagonal matrix (if it exists) is another diagonal matrix whose diagonal entries are the reciprocals of the original diagonal entries.

Question 4: Let $A = \begin{bmatrix} a & d & e \\ 0 & b & f \\ 0 & 0 & c \end{bmatrix}$ and \( B = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix} \).
  1. Compute $AB$ and $BA$.
  2. $A$ and $B$ are upper triangular matrices. What does part (a) demonstrate about the product of two upper triangular matrices?
  3. Compute det($A$). What property does this demonstrate about the determinant of an upper triangular matrix?

For part (c), use cofactor expansion along the first column to find the determinant.

  1. $AB = \begin{bmatrix} a & a+d & a+d+e \\ 0 & b & b+f \\ 0 & 0 & c \end{bmatrix}$, $BA = \begin{bmatrix} a & d+b & e+f+c \\ 0 & b & f+c \\ 0 & 0 & c \end{bmatrix}$
  2. The product of two upper triangular matrices is also an upper triangular matrix.
  3. $\det(A) = abc$. The determinant of a triangular matrix is the product of its diagonal entries.

Question 5: Let \( A = \begin{bmatrix} 1 & 1 & -1 \\ 1 & 2 & 0 \\ -1 & 0 & 5 \end{bmatrix} \).
  1. Find $A^T$.
  2. $A$ is a symmetric matrix. What property of symmetric matrices is being shown in part (a)?

To find the transpose $A^T$, swap the rows and columns of $A$. Then compare $A^T$ with the original matrix $A$.

  1. \[ A^T = \begin{bmatrix} 1 & 1 & -1 \\ 1 & 2 & 0 \\ -1 & 0 & 5 \end{bmatrix} \]
  2. This shows the defining property of a symmetric matrix: it is equal to its own transpose ($A^T = A$).

Question 6: Let \( A = \begin{bmatrix} 4 & -1 \\ 12 & -3 \end{bmatrix} \). Verify whether matrix \( A \) is idempotent, i.e., check whether \( A^2 = A \).

Calculate $A^2$ by multiplying the matrix $A$ by itself.

Yes, the matrix is idempotent.

We check the condition $A^2=A$: \[ A^2 = A \cdot A = \begin{bmatrix} 4 & -1 \\ 12 & -3 \end{bmatrix} \begin{bmatrix} 4 & -1 \\ 12 & -3 \end{bmatrix} \] \[ = \begin{bmatrix} 4(4)+(-1)(12) & 4(-1)+(-1)(-3) \\ 12(4)+(-3)(12) & 12(-1)+(-3)(-3) \end{bmatrix} = \begin{bmatrix} 16-12 & -4+3 \\ 48-36 & -12+9 \end{bmatrix} = \begin{bmatrix} 4 & -1 \\ 12 & -3 \end{bmatrix} \] Since the result is equal to the original matrix $A$, the matrix is idempotent.

Question 7: Let \( P \in \mathbb{R}^{n \times n} \) be an idempotent matrix. Show that \( P(I - P) = \mathbf{0} \), where \( I \) is the \( n \times n \) identity matrix and $\mathbf{0}$ is the zero matrix.

Use the distributive property of matrix multiplication, and then apply the definition of an idempotent matrix ($P^2=P$).

The proof uses the distributive property and the fact that $P^2=P$ for an idempotent matrix.

We start with the expression $P(I-P)$ and use the distributive law for matrices: \[ P(I - P) = PI - P^2 \] We know that multiplying any matrix by the identity matrix leaves it unchanged, so $PI = P$. \[ = P - P^2 \] By the definition of an idempotent matrix, we know that $P^2=P$. We substitute this into the expression: \[ = P - P = \mathbf{0} \] Where $\mathbf{0}$ is the $n \times n$ zero matrix.
©