Problem Set 2: Matrix Arithmetic#

Section A: Basic Matrix Operations#

Problem 1: Given matrices \(A = \begin{bmatrix} 2 & -1 \\ 3 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 1 & 5 \\ -2 & 3 \end{bmatrix}\), compute \(A + B\).

Problem 2: Using the same matrices from Problem 1, compute \(A - B\).

Problem 3: Given \(C = \begin{bmatrix} 3 & 0 & -2 \\ 1 & 4 & 5 \end{bmatrix}\) and \(D = \begin{bmatrix} -1 & 2 & 3 \\ 6 & -3 & 1 \end{bmatrix}\), find \(2C - 3D\).

Problem 4: Compute \(3A^T\) where \(A = \begin{bmatrix} 1 & -2 & 4 \\ 0 & 3 & -1 \end{bmatrix}\).

Problem 5: Given \(E = \begin{bmatrix} 2 & -1 \\ 0 & 3 \\ 4 & 1 \end{bmatrix}\) and \(F = \begin{bmatrix} 1 & 2 & -1 \\ 3 & 0 & 4 \end{bmatrix}\), determine if \(E + F\) is defined. If not, explain why.

Problem 6: Find the scalar \(k\) such that \(k\begin{bmatrix} 2 & -4 \\ 6 & 8 \end{bmatrix} = \begin{bmatrix} 1 & -2 \\ 3 & 4 \end{bmatrix}\).

Section B: Matrix-Vector Multiplication#

Problem 7: Compute \(\begin{bmatrix} 1 & 2 & -1 \\ 3 & 0 & 4 \end{bmatrix} \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix}\).

Problem 8: Given \(A = \begin{bmatrix} 2 & -1 & 3 \\ 0 & 4 & -2 \\ 1 & 1 & 5 \end{bmatrix}\) and \(\mathbf{x} = \begin{bmatrix} 1 \\ -2 \\ 3 \end{bmatrix}\), find \(A\mathbf{x}\).

Problem 9: Determine if the product \(\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix}\) is defined. If not, explain the dimensional incompatibility.

Problem 10: Compute \(\begin{bmatrix} 3 & -2 & 1 & 4 \end{bmatrix} \begin{bmatrix} 2 \\ 0 \\ -1 \\ 3 \end{bmatrix}\).

Problem 11: Given \(\mathbf{b} = \begin{bmatrix} 5 \\ -2 \\ 1 \end{bmatrix}\) and \(A = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \\ 2 & -1 & 0 \end{bmatrix}\), solve for \(\mathbf{x}\) in the equation \(A\mathbf{x} = \mathbf{b}\) (if possible).

Section C: Matrix-Matrix Multiplication#

Problem 12: Compute \(\begin{bmatrix} 1 & 2 \\ 3 & -1 \end{bmatrix} \begin{bmatrix} 4 & 0 \\ -2 & 5 \end{bmatrix}\).

Problem 13: Given \(P = \begin{bmatrix} 2 & -1 & 3 \\ 0 & 4 & -2 \end{bmatrix}\) and \(Q = \begin{bmatrix} 1 & 2 \\ -3 & 1 \\ 2 & 0 \end{bmatrix}\), find \(PQ\).

Problem 14: Compute \(QP\) using the matrices from Problem 13.

Problem 15: Determine if \(\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \begin{bmatrix} 7 & 8 \\ 9 & 10 \end{bmatrix}\) is defined. Explain your reasoning.

Problem 16: Find \(AB\) and \(BA\) where \(A = \begin{bmatrix} 1 & 2 \\ 0 & -1 \end{bmatrix}\) and \(B = \begin{bmatrix} 3 & 1 \\ -2 & 4 \end{bmatrix}\). Are they equal?

Problem 17: Compute \(\begin{bmatrix} 2 & -1 & 0 \\ 1 & 3 & 2 \\ -1 & 0 & 4 \end{bmatrix}^2\).

Section D: Dot Product as Matrix Multiplication#

Problem 18: Express the dot product \(\mathbf{u} \cdot \mathbf{v}\) as a matrix multiplication where \(\mathbf{u} = \begin{bmatrix} 3 \\ -2 \\ 1 \end{bmatrix}\) and \(\mathbf{v} = \begin{bmatrix} 4 \\ 1 \\ -3 \end{bmatrix}\).

Problem 19: Compute the dot product \(\begin{bmatrix} 2 & -1 & 3 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 4 \\ -2 \\ 5 \end{bmatrix}\).

Problem 20: Given vectors \(\mathbf{a} = \begin{bmatrix} 1 \\ 2 \\ -1 \end{bmatrix}\) and \(\mathbf{b} = \begin{bmatrix} 3 \\ 0 \\ 4 \end{bmatrix}\), compute \(\mathbf{a}^T\mathbf{b}\) and \(\mathbf{a}\mathbf{b}^T\).

Problem 21: Show that \((\mathbf{u} \cdot \mathbf{v})^2 = (\mathbf{u}^T\mathbf{v})(\mathbf{v}^T\mathbf{u})\) for \(\mathbf{u} = \begin{bmatrix} 2 \\ -3 \end{bmatrix}\) and \(\mathbf{v} = \begin{bmatrix} 1 \\ 4 \end{bmatrix}\).

Section E: Dimensional Analysis and Undefined Operations#

Problem 22: Explain why \(\begin{bmatrix} 1 & 2 & 3 \end{bmatrix} + \begin{bmatrix} 4 \\ 5 \\ 6 \end{bmatrix}\) is undefined.

Problem 23: Determine which of the following matrix products are defined and state the dimensions of the result:

  • a) \((2 \times 3)(3 \times 4)\)

  • b) \((4 \times 2)(3 \times 2)\)

  • c) \((1 \times 5)(5 \times 1)\)

  • d) \((3 \times 3)(2 \times 3)\)

Problem 24: Given matrices \(A_{2 \times 4}\), \(B_{4 \times 3}\), and \(C_{3 \times 2}\), determine if \((AB)C\) and \(A(BC)\) are both defined and have the same dimensions.

Problem 25: Explain why the equation \(A\mathbf{x} = \mathbf{b}\) has no solution when \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(\mathbf{b} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}\) from a dimensional perspective.

Problem 26: State the conditions under which \(AB = BA\) is possible for matrices \(A\) and \(B\) in terms of their dimensions.

Section F: Mixed Applications#

Problem 27: Given \(A = \begin{bmatrix} 1 & 0 & -1 \\ 2 & 1 & 3 \end{bmatrix}\) and \(\mathbf{x} = \begin{bmatrix} 2 \\ -1 \\ 1 \end{bmatrix}\), find the unit vector in the direction of \(A\mathbf{x}\).

Problem 28: Compute \(\|A\mathbf{x}\|_2\) where \(A = \begin{bmatrix} 3 & -1 \\ 2 & 4 \\ 0 & 1 \end{bmatrix}\) and \(\mathbf{x} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}\).

Problem 29: For the matrix \(M = \begin{bmatrix} 1/3 & 2/3 & 2/3 \\ 2/3 & 1/3 & -2/3 \\ 2/3 & -2/3 & 1/3 \end{bmatrix}\), verify that each column is a unit vector and that the columns are mutually orthogonal; that is, their dot products are zero.

Problem 30: Given vectors \(\mathbf{u} = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}\) and \(\mathbf{v} = \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix}\), find scalars \(a\) and \(b\) such that \(\|a\mathbf{u} + b\mathbf{v}\| = 1\) and \(a + b = 1\).

Problem 31: Show that for any matrix \(A\) and compatible vectors \(\mathbf{u}\) and \(\mathbf{v}\), the triangle inequality holds: \(\|A(\mathbf{u} + \mathbf{v})\|_2 \leq \|A\mathbf{u}\|_2 + \|A\mathbf{v}\|_2\). Verify with \(A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\), \(\mathbf{u} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}\), and \(\mathbf{v} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}\).