Level 2 — RecallLinear Algebra Essentials

Linear Algebra Essentials

30 minutes40 marksprintable — key stays hidden on paper

Level 2 — Recall & Standard Problems Time limit: 30 minutes Total marks: 40

Answer all questions. Show working where required. Use ...... notation for vectors and matrices.


Q1. (3 marks) Define the following in one line each, giving the number of indices needed to specify an element: (a) scalar, (b) vector, (c) 3rd-order tensor.

Q2. (4 marks) Let a=(3,1,2)\mathbf{a} = (3, -1, 2) and b=(1,4,2)\mathbf{b} = (1, 4, -2). (a) Compute the dot product ab\mathbf{a} \cdot \mathbf{b}. (2 marks) (b) State whether the vectors are orthogonal and justify. (2 marks)

Q3. (5 marks) For the vector v=(2,3,6)\mathbf{v} = (2, -3, 6), compute: (a) the L1L_1 norm, (b) the L2L_2 norm, (c) the LL_\infty norm.

Q4. (4 marks) Given A=(1203),B=(4125).A = \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix}, \quad B = \begin{pmatrix} 4 & 1 \\ 2 & 5 \end{pmatrix}. Compute the product ABAB and state its dimensions.

Q5. (4 marks) Compute the determinant of M=(210131012).M = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{pmatrix}.

Q6. (5 marks) For A=(4726)A = \begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix}: (a) State the condition for a matrix to be invertible. (1 mark) (b) Compute A1A^{-1}. (4 marks)

Q7. (4 marks) State whether each statement is TRUE or FALSE and give a one-line reason: (a) (AB)T=ATBT(AB)^T = A^T B^T. (b) An orthogonal matrix QQ satisfies QTQ=IQ^T Q = I. (c) The trace of a matrix equals the sum of its eigenvalues. (d) A symmetric matrix always has real eigenvalues.

Q8. (5 marks) Find the eigenvalues of A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} and find an eigenvector for the larger eigenvalue.

Q9. (3 marks) Define rank of a matrix. Determine the rank of C=(123246).C = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{pmatrix}.

Q10. (3 marks) A matrix AA is symmetric with eigenvalues 3,1,53, 1, 5. Is AA positive definite? Explain in one sentence using the definition of a positive definite matrix.


END OF PAPER

Answer keyMark scheme & solutions

Q1. (3 marks)

  • (a) Scalar: a single number, 0 indices. (1)
  • (b) Vector: an ordered array of numbers, 1 index. (1)
  • (c) 3rd-order tensor: a multidimensional array requiring 3 indices to specify an element. (1) Why: number of indices = order/rank of the object.

Q2. (4 marks)

  • (a) ab=(3)(1)+(1)(4)+(2)(2)=344=5\mathbf{a}\cdot\mathbf{b} = (3)(1)+(-1)(4)+(2)(-2) = 3 - 4 - 4 = -5. (2)
  • (b) Not orthogonal, since dot product =50= -5 \neq 0. (2) Why: orthogonality ⟺ dot product zero.

Q3. (5 marks)

  • (a) L1=2+3+6=11L_1 = |2|+|-3|+|6| = 11. (1.5)
  • (b) L2=4+9+36=49=7L_2 = \sqrt{4+9+36} = \sqrt{49} = 7. (2)
  • (c) L=max(2,3,6)=6L_\infty = \max(2,3,6) = 6. (1.5) Why: definitions of LpL_p norms.

Q4. (4 marks) AB=(14+2211+2504+3201+35)=(811615).AB = \begin{pmatrix} 1\cdot4+2\cdot2 & 1\cdot1+2\cdot5 \\ 0\cdot4+3\cdot2 & 0\cdot1+3\cdot5 \end{pmatrix} = \begin{pmatrix} 8 & 11 \\ 6 & 15 \end{pmatrix}. (3) Dimensions: 2×22\times2. (1) Why: (m×n)(n×p)=m×p(m\times n)(n\times p) = m\times p; row-by-column products.

Q5. (4 marks) Expand along first row: detM=2(3211)1(1210)+0\det M = 2(3\cdot2 - 1\cdot1) - 1(1\cdot2 - 1\cdot0) + 0 =2(61)1(2)=102=8.= 2(6-1) - 1(2) = 10 - 2 = 8. (4) Why: cofactor expansion.

Q6. (5 marks)

  • (a) Invertible ⟺ determinant 0\neq 0 (equivalently full rank). (1)
  • (b) detA=4672=2414=10\det A = 4\cdot6 - 7\cdot2 = 24-14 = 10. (1) A1=110(6724)=(0.60.70.20.4).A^{-1} = \frac{1}{10}\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 0.6 & -0.7 \\ -0.2 & 0.4 \end{pmatrix}. (3) Why: 2×22\times2 inverse formula 1det(dbca)\frac{1}{\det}\begin{pmatrix} d & -b \\ -c & a\end{pmatrix}.

Q7. (4 marks, 1 each)

  • (a) FALSE — (AB)T=BTAT(AB)^T = B^T A^T (order reverses).
  • (b) TRUE — definition of orthogonal matrix.
  • (c) TRUE — trace = sum of eigenvalues.
  • (d) TRUE — real symmetric matrices have real eigenvalues (spectral theorem).

Q8. (5 marks) Characteristic equation: det(AλI)=(2λ)21=0\det(A-\lambda I) = (2-\lambda)^2 - 1 = 0. (2λ)2=12λ=±1λ=1,3(2-\lambda)^2 = 1 \Rightarrow 2-\lambda = \pm1 \Rightarrow \lambda = 1, 3. (3) Larger eigenvalue λ=3\lambda=3: solve (A3I)x=0(A-3I)\mathbf{x}=0: (1111)x=0x1=x2\begin{pmatrix} -1 & 1 \\ 1 & -1\end{pmatrix}\mathbf{x}=0 \Rightarrow x_1 = x_2, eigenvector (1,1)(1,1). (2) Why: eigenvalues from characteristic polynomial; eigenvector from null space.

Q9. (3 marks) Rank = number of linearly independent rows (= independent columns) = dimension of column space. (1.5) Row 2 = 2 × Row 1, so only one independent row ⟹ rank C=1C = 1. (1.5)

Q10. (3 marks) Yes, AA is positive definite. (1) A symmetric matrix is positive definite ⟺ all eigenvalues are strictly positive; here 3,1,5>03,1,5 > 0. (2)

[
  {"claim":"a·b = -5","code":"a=Matrix([3,-1,2]); b=Matrix([1,4,-2]); result = (a.dot(b) == -5)"},
  {"claim":"L2 norm of (2,-3,6) is 7","code":"v=Matrix([2,-3,6]); result = (sqrt(v.dot(v)) == 7)"},
  {"claim":"AB = [[8,11],[6,15]]","code":"A=Matrix([[1,2],[0,3]]); B=Matrix([[4,1],[2,5]]); result = (A*B == Matrix([[8,11],[6,15]]))"},
  {"claim":"det M = 8","code":"M=Matrix([[2,1,0],[1,3,1],[0,1,2]]); result = (M.det() == 8)"},
  {"claim":"eigenvalues of [[2,1],[1,2]] are 1 and 3","code":"A=Matrix([[2,1],[1,2]]); result = (set(A.eigenvals().keys()) == {1,3})"},
  {"claim":"inverse of [[4,7],[2,6]]","code":"A=Matrix([[4,7],[2,6]]); result = (A.inv() == Matrix([[Rational(3,5),Rational(-7,10)],[Rational(-1,5),Rational(2,5)]]))"}
]