Skip to content

Matrices -- Diagnostic Tests

flowchart TD
A[Diag Matrices] --> B[Key Concepts]
A --> C[Core Principles]
A --> D[Practical Applications]
B --> E[Fundamental definitions]
C --> F[Design patterns]
D --> G[Real-world usage]

This topic explores fundamental concepts that shape our understanding of the world.

Question: Given A=(3124)\mathbf{A} = \begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix} and B=(1−102)\mathbf{B} = \begin{pmatrix} 1 & -1 \\ 0 & 2 \end{pmatrix}(a) calculate AB\mathbf{AB} and BA\mathbf{BA}. Is matrix multiplication commutative? (b) Calculate det⁡(A)\det(\mathbf{A}) and A−1\mathbf{A}^{-1}. (c) Solve Ax=(712)\mathbf{A}\mathbf{x} = \begin{pmatrix} 7 \\ 12 \end{pmatrix}. (d) Calculate (AB)−1(\mathbf{AB})^{-1} and verify it equals B−1A−1\mathbf{B}^{-1}\mathbf{A}^{-1}.

Solution:

(a) AB=(3124)(1−102)=(3−126)\mathbf{AB} = \begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix}\begin{pmatrix} 1 & -1 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 3 & -1 \\ 2 & 6 \end{pmatrix}. BA=(1−102)(3124)=(1−348)\mathbf{BA} = \begin{pmatrix} 1 & -1 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix} = \begin{pmatrix} 1 & -3 \\ 4 & 8 \end{pmatrix}. AB≠BA\mathbf{AB} \ne \mathbf{BA} So matrix multiplication is not commutative.

(b) det⁡(A)=3(4)−1(2)=12−2=10\det(\mathbf{A}) = 3(4) - 1(2) = 12 - 2 = 10. A−1=110(4−1−23)=(0.4−0.1−0.20.3)\mathbf{A}^{-1} = \frac{1}{10}\begin{pmatrix} 4 & -1 \\ -2 & 3 \end{pmatrix} = \begin{pmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{pmatrix}.

(c) x=A−1(712)=(0.4−0.1−0.20.3)(712)=(2.8−1.2−1.4+3.6)=(1.62.2)\mathbf{x} = \mathbf{A}^{-1}\begin{pmatrix} 7 \\ 12 \end{pmatrix} = \begin{pmatrix} 0.4 & -0.1 \\ -0.2 & 0.3 \end{pmatrix}\begin{pmatrix} 7 \\ 12 \end{pmatrix} = \begin{pmatrix} 2.8 - 1.2 \\ -1.4 + 3.6 \end{pmatrix} = \begin{pmatrix} 1.6 \\ 2.2 \end{pmatrix}.

(d) det⁡(B)=1(2)−(−1)(0)=2\det(\mathbf{B}) = 1(2) - (-1)(0) = 2. B−1=12(2101)\mathbf{B}^{-1} = \frac{1}{2}\begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}. B−1A−1=120(2101)(4−1−23)=120(61−23)\mathbf{B}^{-1}\mathbf{A}^{-1} = \frac{1}{20}\begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 4 & -1 \\ -2 & 3 \end{pmatrix} = \frac{1}{20}\begin{pmatrix} 6 & 1 \\ -2 & 3 \end{pmatrix}.

(AB)−1(\mathbf{AB})^{-1}: det⁡(AB)=3(6)−(−1)(2)=20\det(\mathbf{AB}) = 3(6) - (-1)(2) = 20. (AB)−1=120(61−23)(\mathbf{AB})^{-1} = \frac{1}{20}\begin{pmatrix} 6 & 1 \\ -2 & 3 \end{pmatrix}. Confirmed equal.

Question: M=(120013201)\mathbf{M} = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 2 & 0 & 1 \end{pmatrix}. (a) Calculate det⁡(M)\det(\mathbf{M}). (b) Find M−1\mathbf{M}^{-1}. (c) Solve Mx=(574)\mathbf{M}\mathbf{x} = \begin{pmatrix} 5 \\ 7 \\ 4 \end{pmatrix}. (d) Explain what det⁡(M)=0\det(\mathbf{M}) = 0 would mean.

Solution:

(a) det⁡(M)=1∣1301∣−2∣0321∣+0=1(1−0)−2(0−6)=1+12=13\det(\mathbf{M}) = 1\begin{vmatrix} 1 & 3 \\ 0 & 1 \end{vmatrix} - 2\begin{vmatrix} 0 & 3 \\ 2 & 1 \end{vmatrix} + 0 = 1(1 - 0) - 2(0 - 6) = 1 + 12 = 13.

(b) Cofactors: C_{11} = 1$$C_{12} = 6$$C_{13} = -2$$C_{21} = -2$$C_{22} = 1$$C_{23} = 4$$C_{31} = 6$$C_{32} = -3$$C_{33} = 1.

M−1=113(1−2661−3−241)\mathbf{M}^{-1} = \frac{1}{13}\begin{pmatrix} 1 & -2 & 6 \\ 6 & 1 & -3 \\ -2 & 4 & 1 \end{pmatrix}.

(c) x=M−1(574)=113(5−14+2430+7−12−10+28+4)=113(152522)\mathbf{x} = \mathbf{M}^{-1}\begin{pmatrix} 5 \\ 7 \\ 4 \end{pmatrix} = \frac{1}{13}\begin{pmatrix} 5 - 14 + 24 \\ 30 + 7 - 12 \\ -10 + 28 + 4 \end{pmatrix} = \frac{1}{13}\begin{pmatrix} 15 \\ 25 \\ 22 \end{pmatrix}.

(d) If det⁡(M)=0\det(\mathbf{M}) = 0 The matrix is singular (non-invertible). This means: the rows (and columns) are linearly dependent, the matrix does not have full rank, the system Mx=b\mathbf{M}\mathbf{x} = \mathbf{b} has either no solution or infinitely many solutions (depending on b\mathbf{b}), and the corresponding linear transformation collapses the space into a lower dimension.

Question: A=(4123)\mathbf{A} = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}. (a) Find the eigenvalues of A\mathbf{A}. (b) Find the corresponding eigenvectors. (c) Form the matrix P\mathbf{P} of eigenvectors and P−1AP\mathbf{P}^{-1}\mathbf{A}\mathbf{P}. What form does this take? (d) Use the eigenvalues to calculate A5\mathbf{A}^5.

Solution:

(a) det⁡(A−λI)=∣4−λ123−λ∣=(4−λ)(3−λ)−2=λ2−7λ+10=0\det(\mathbf{A} - \lambda\mathbf{I}) = \begin{vmatrix} 4-\lambda & 1 \\ 2 & 3-\lambda \end{vmatrix} = (4-\lambda)(3-\lambda) - 2 = \lambda^2 - 7\lambda + 10 = 0. (λ−5)(λ−2)=0(\lambda - 5)(\lambda - 2) = 0. Eigenvalues: \lambda_1 = 5$$\lambda_2 = 2.

(b) For λ=5\lambda = 5: (A−5I)v=0(\mathbf{A} - 5\mathbf{I})\mathbf{v} = \mathbf{0}. (−112−2)(xy)=0\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \mathbf{0}. -x + y = 0$$y = x. Eigenvector: (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

For λ=2\lambda = 2: (A−2I)v=0(\mathbf{A} - 2\mathbf{I})\mathbf{v} = \mathbf{0}. (2121)(xy)=0\begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \mathbf{0}. 2x + y = 0$$y = -2x. Eigenvector: (1−2)\begin{pmatrix} 1 \\ -2 \end{pmatrix}.

(c) P=(111−2)\mathbf{P} = \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}. det⁡(P)=−3\det(\mathbf{P}) = -3. P−1=1−3(−2−1−11)=13(211−1)\mathbf{P}^{-1} = \frac{1}{-3}\begin{pmatrix} -2 & -1 \\ -1 & 1 \end{pmatrix} = \frac{1}{3}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}.

D=P−1AP=(5002)\mathbf{D} = \mathbf{P}^{-1}\mathbf{A}\mathbf{P} = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix} (diagonal matrix of eigenvalues).

(d) A5=PD5P−1=(111−2)(31250032)13(211−1)\mathbf{A}^5 = \mathbf{P}\mathbf{D}^5\mathbf{P}^{-1} = \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}\begin{pmatrix} 3125 & 0 \\ 0 & 32 \end{pmatrix}\frac{1}{3}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}.

=13(3125323125−64)(211−1)=13(6282309361863189)=(2094103120621063)= \frac{1}{3}\begin{pmatrix} 3125 & 32 \\ 3125 & -64 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} = \frac{1}{3}\begin{pmatrix} 6282 & 3093 \\ 6186 & 3189 \end{pmatrix} = \begin{pmatrix} 2094 & 1031 \\ 2062 & 1063 \end{pmatrix}.


IT-1: Matrices and Geometric Transformations (with Vectors)

Section titled “IT-1: Matrices and Geometric Transformations (with Vectors)”

Question: The matrix T=(0−110)\mathbf{T} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} represents a rotation. (a) Find the angle and direction of rotation. (b) The point (3,4)(3, 4) is transformed by T\mathbf{T}. Calculate the image. (c) If S=(−1001)\mathbf{S} = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} (reflection in the yy-axis), find TS\mathbf{TS} and describe the combined transformation. (d) Calculate det⁡(T)\det(\mathbf{T}) and det⁡(S)\det(\mathbf{S}) And explain how determinants relate to area scale factors.

Solution:

(a) T\mathbf{T} maps (1,0)(1, 0) to (0,1)(0, 1) and (0,1)(0, 1) to (−1,0)(-1, 0). This is a rotation of 90∘90^\circ anticlockwise about the origin.

(b) (0−110)(34)=(−43)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 3 \\ 4 \end{pmatrix} = \begin{pmatrix} -4 \\ 3 \end{pmatrix}. Image: (−4,3)(-4, 3).

(c) TS=(0−110)(−1001)=(0−1−10)\mathbf{TS} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}.

This maps (1,0)(1,0) to (0,−1)(0,-1) and (0,1)(0,1) to (−1,0)(-1,0): a reflection in the line y=−xy = -x.

(d) det⁡(T)=0×0−(−1)×1=1\det(\mathbf{T}) = 0 \times 0 - (-1) \times 1 = 1. det⁡(S)=−1×1−0=−1\det(\mathbf{S}) = -1 \times 1 - 0 = -1.

The absolute value of the determinant gives the area scale factor: T\mathbf{T} preserves area (scale factor 1), S\mathbf{S} preserves area (scale factor ∣−1∣=1|-1| = 1). The sign indicates orientation: positive == orientation preserved (rotation), negative == orientation reversed (reflection).

IT-2: Systems of Linear Equations (with Complex Numbers)

Section titled “IT-2: Systems of Linear Equations (with Complex Numbers)”

Question: Solve the system: x + 2y + z = 4$$2x - y + 3z = 9$$x + y + z = 5. (a) Write in matrix form Ax=b\mathbf{A}\mathbf{x} = \mathbf{b}. (b) Calculate det⁡(A)\det(\mathbf{A}). (c) Find A−1\mathbf{A}^{-1} and solve for x\mathbf{x}. (d) Explain what would happen if det⁡(A)=0\det(\mathbf{A}) = 0.

Solution:

(a) (1212−13111)(xyz)=(495)\begin{pmatrix} 1 & 2 & 1 \\ 2 & -1 & 3 \\ 1 & 1 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 4 \\ 9 \\ 5 \end{pmatrix}.

(b) det⁡(A)=1(−1−3)−2(2−3)+1(2+1)=−4+2+3=1\det(\mathbf{A}) = 1(-1 - 3) - 2(2 - 3) + 1(2 + 1) = -4 + 2 + 3 = 1.

(c) Cofactors: C_{11} = -4$$C_{12} = 1$$C_{13} = 3$$C_{21} = -1$$C_{22} = 0$$C_{23} = 1$$C_{31} = 7$$C_{32} = -1$$C_{33} = -5.

A−1=(−4−1710−131−5)\mathbf{A}^{-1} = \begin{pmatrix} -4 & -1 & 7 \\ 1 & 0 & -1 \\ 3 & 1 & -5 \end{pmatrix}.

x=A−1(495)=(−16−9+354+0−512+9−25)=(10−1−4)\mathbf{x} = \mathbf{A}^{-1}\begin{pmatrix} 4 \\ 9 \\ 5 \end{pmatrix} = \begin{pmatrix} -16 - 9 + 35 \\ 4 + 0 - 5 \\ 12 + 9 - 25 \end{pmatrix} = \begin{pmatrix} 10 \\ -1 \\ -4 \end{pmatrix}.

x = 10$$y = -1$$z = -4. Verification: 10−2−4=4✓10 - 2 - 4 = 4 \checkmark; 20+1−12=9✓20 + 1 - 12 = 9 \checkmark; 10−1−4=5✓10 - 1 - 4 = 5 \checkmark.

(d) If det⁡(A)=0\det(\mathbf{A}) = 0 The matrix is singular and A−1\mathbf{A}^{-1} does not exist. This means the three equations are linearly dependent. The system has either no unique solution: either no solution (inconsistent) or infinitely many solutions.

IT-3: Matrix Applications (with Differential Equations)

Section titled “IT-3: Matrix Applications (with Differential Equations)”

Question: The matrix A=(2112)\mathbf{A} = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} defines a system of coupled differential equations dxdt=Ax\frac{d\mathbf{x}}{dt} = \mathbf{A}\mathbf{x} where x=(xy)\mathbf{x} = \begin{pmatrix} x \\ y \end{pmatrix}. (a) Find the eigenvalues and eigenvectors of A\mathbf{A}. (b) Write the general solution for x(t)\mathbf{x}(t) given that x(0)=(31)\mathbf{x}(0) = \begin{pmatrix} 3 \\ 1 \end{pmatrix}. (c) Calculate x(1)\mathbf{x}(1). (d) Describe the long-term behaviour of the solution.

Solution:

(a) det⁡(A−λI)=(2−λ)2−1=λ2−4λ+3=0\det(\mathbf{A} - \lambda\mathbf{I}) = (2-\lambda)^2 - 1 = \lambda^2 - 4\lambda + 3 = 0. \lambda_1 = 3$$\lambda_2 = 1.

λ=3\lambda = 3: eigenvector (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}. λ=1\lambda = 1: eigenvector (1−1)\begin{pmatrix} 1 \\ -1 \end{pmatrix}.

(b) General solution: x(t)=c1e3t(11)+c2et(1−1)\mathbf{x}(t) = c_1 e^{3t}\begin{pmatrix} 1 \\ 1 \end{pmatrix} + c_2 e^{t}\begin{pmatrix} 1 \\ -1 \end{pmatrix}.

x(0)=c1(11)+c2(1−1)=(31)\mathbf{x}(0) = c_1\begin{pmatrix} 1 \\ 1 \end{pmatrix} + c_2\begin{pmatrix} 1 \\ -1 \end{pmatrix} = \begin{pmatrix} 3 \\ 1 \end{pmatrix}. c1+c2=3c_1 + c_2 = 3 and c1−c2=1c_1 - c_2 = 1. Solving: c_1 = 2$$c_2 = 1.

x(t)=2e3t(11)+et(1−1)=(2e3t+et2e3t−et)\mathbf{x}(t) = 2e^{3t}\begin{pmatrix} 1 \\ 1 \end{pmatrix} + e^{t}\begin{pmatrix} 1 \\ -1 \end{pmatrix} = \begin{pmatrix} 2e^{3t} + e^t \\ 2e^{3t} - e^t \end{pmatrix}.

(c) x(1)=(2e3+e2e3−e)=(2(20.086)+2.7182(20.086)−2.718)=(42.8937.45)\mathbf{x}(1) = \begin{pmatrix} 2e^3 + e \\ 2e^3 - e \end{pmatrix} = \begin{pmatrix} 2(20.086) + 2.718 \\ 2(20.086) - 2.718 \end{pmatrix} = \begin{pmatrix} 42.89 \\ 37.45 \end{pmatrix}.

(d) As t→∞t \to \infty The term e3te^{3t} dominates (both eigenvalues are positive). Both xx and yy grow exponentially, with x≈2e3tx \approx 2e^{3t} and y≈2e3ty \approx 2e^{3t}. The solution diverges away from the origin — the origin is an unstable node. The ratio x/y→1x/y \to 1 as t→∞t \to \infty Meaning the trajectory approaches the direction of the eigenvector (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

Multiplying matrices in the wrong order: For a system Ax=bA\mathbf{x} = \mathbf{b}, the solution is x=A−1b\mathbf{x} = A^{-1}\mathbf{b}, not bA−1\mathbf{b}A^{-1}. Matrix multiplication is not commutative. Always multiply the inverse on the left: A−1A^{-1} times b\mathbf{b}, not b\mathbf{b} times A−1A^{-1}.

Confusing eigenvalues with eigenvectors: An eigenvalue λ\lambda is a scalar satisfying det⁡(A−λI)=0\det(A - \lambda I) = 0. An eigenvector v\mathbf{v} satisfies Av=λvA\mathbf{v} = \lambda\mathbf{v}. Students often compute the characteristic equation correctly but then substitute the eigenvalue back into A−λIA - \lambda I instead of solving (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0} for the eigenvector.

Forgetting to normalise or verify eigenvectors: After finding an eigenvector, always verify by computing AvA\mathbf{v} and checking it equals λv\lambda\mathbf{v}. A common error is a sign mistake in the eigenvector components that goes undetected. Also, any scalar multiple of an eigenvector is still an eigenvector, you can scale to simplify.