Blog
Linear Algebra Past Paper 2015 – BS IT 3rd Term UOS (MATH-3215)
University of Sargodha BS IT 3rd term Linear Algebra (MATH-3215) paper, 2015 exam (80 marks, 2:30 hours). The paper is retyped below, followed by step-by-step solutions for all 16 short questions and all six subjective questions: Gauss-Jordan elimination, consistency depending on a, eigenvalues with minors and cofactors, rank and nullity, LU decomposition and the inverse. All answers were checked with SymPy.
Solved answers
Q1 – Short answers (16 × 2)
i. Angle between u = (1, −5, 1) and v = (0, 0, −1). u·v = −1, ‖u‖ = √27 = 3√3, ‖v‖ = 1. cos θ = −1/(3√3) = −√3/9 ≈ −0.1925, so θ ≈ 101.1°.
ii. Characteristic equation. det(A − λI) = 0; its roots are the eigenvalues of A.
iii. Eigen vector. A non-zero vector x with Ax = λx for some scalar λ; A only stretches or shrinks it.
iv. Types of distributions. This is a statistics question rather than linear algebra. Main probability distributions: discrete – binomial, Poisson, geometric, uniform; continuous – normal (Gaussian), uniform, exponential, t, chi-square, F.
v. Similar matrices. B is similar to A if B = P−1AP for an invertible P; similar matrices have the same eigenvalues, determinant and trace.
vi. Dependent vectors. Vectors v1, …, vk are linearly dependent if c1v1 + … + ckvk = 0 with some ci ≠ 0, i.e. one is a combination of the others. Example: (1, 2) and (2, 4), since (2, 4) = 2(1, 2).
vii. Reduced echelon form. A matrix in row echelon form in which every leading entry is 1 and is the only non-zero entry in its column, e.g. [1 0 3; 0 1 −2].
viii. Augmented matrix. The coefficient matrix with the constants added as the last column. For x + 2y = 5, 3x − y = 1: [1 2 | 5; 3 −1 | 1].
ix. Similar matrices. Same as (v): A ~ B if B = P−1AP for an invertible matrix P.
x. (AB)T = BTAT. ((AB)T)ij = (AB)ji = Σk ajkbki = Σk (BT)ik(AT)kj = (BTAT)ij.
xi. Orthogonal vectors. u and v are orthogonal when u·v = 0 (the angle between them is 90°).
xii. Linearly independent vectors. Vectors for which c1v1 + … + ckvk = 0 only when all ci = 0, e.g. (1, 0) and (0, 1).
xiii. Basis. A set of vectors in a vector space that is linearly independent and spans the space, e.g. {(1, 0, 0), (0, 1, 0), (0, 0, 1)} for R³. (The basis of the row/column space of a matrix is a set of independent rows/columns that span it.)
xiv. Subspace. A non-empty subset W of a vector space V that is itself a vector space under the same operations – it contains 0 and is closed under addition and scalar multiplication, e.g. a line through the origin in R².
xv. A−1 for A = [3 0; 10 4]. det A = 12. A−1 = (1/12)[4 0; −10 3] = [1/3 0; −5/6 1/4].
xvi. Solve for a, b, c, d. a − b = 8, b + a = 1 ⇒ a = 9/2, b = −7/2; 3d + c = 7, 2d − c = 6 ⇒ 5d = 13 ⇒ d = 13/5, c = −4/5.
Q2 – Gauss-Jordan elimination
[ 1 2 -3 | 6 ] R2-2R1, R3-R1 [ 1 2 -3 | 6 ]
[ 2 -1 4 | 1 ] -------------> [ 0 -5 10 | -11 ]
[ 1 -1 1 | 3 ] [ 0 -3 4 | -3 ]
R2/(-5): [ 0 1 -2 | 11/5 ]
R3+3R2: [ 0 0 -2 | 18/5 ] -> R3/(-2): x3 = -9/5
R2+2R3, R1+3R3, R1-2R2:
[ 1 0 0 | 17/5 ]
[ 0 1 0 | -7/5 ]
[ 0 0 1 | -9/5 ]x1 = 17/5, x2 = −7/5, x3 = −9/5. Check: 17/5 − 14/5 + 27/5 = 30/5 = 6 ✓; 34/5 + 7/5 − 36/5 = 1 ✓; 17/5 + 7/5 − 9/5 = 3 ✓.
Q3 – Values of a
Augmented matrix and elimination: R2 − 3R1, R3 − 4R1:
[ 1 2 -3 | 4 ]
[ 0 -7 14 | -10 ]
[ 0 -7 a^2+10 | a - 12 ]
R3 - R2:
[ 1 2 -3 | 4 ]
[ 0 -7 14 | -10 ]
[ 0 0 a^2-4 | a - 2 ]The last row is (a² − 4)z = a − 2, i.e. (a − 2)(a + 2)z = a − 2.
- a = −2: 0·z = −4 – impossible, so no solution.
- a = 2: 0·z = 0 – z is free, so infinitely many solutions.
- a ≠ ±2: z = 1/(a + 2) – exactly one solution.
Q4 – Eigenvalues, eigenvectors, minors and cofactors of [1 −2 3; 6 7 −1; −3 1 4]
Characteristic equation: det(A − λI) = 0. Expanding: (1 − λ)[(7 − λ)(4 − λ) + 1] + 2[6(4 − λ) − 3] + 3[6 + 3(7 − λ)] = 0, which gives
λ³ − 12λ² + 61λ − 152 = 0 (trace = 12, det A = 152).
This cubic has no rational root (±1, ±2, ±4, ±8, ±19, … do not satisfy it). It has one real root and a pair of complex roots: λ1 ≈ 6.0785, λ2,3 ≈ 2.9607 ± 4.0299 i (check: 6.0785 + 2 × 2.9607 = 12).
Eigenvectors from (A − λI)v = 0 with v3 = 1: for λ1 ≈ 6.0785, v1 ≈ (−0.104, 1.765, 1); for λ2,3, v ≈ (0.100 ∓ 1.063 i, −0.740 ± 0.841 i, 1). (Values computed with NumPy/SymPy; the matrix as printed does not have “nice” eigenvalues, so the question may have a printing error.)
Minors Mij (delete row i and column j) and cofactors Cij = (−1)i+jMij:
| Mi1 | Mi2 | Mi3 | Ci1 | Ci2 | Ci3 | |
|---|---|---|---|---|---|---|
| Row 1 | 29 | 21 | 27 | 29 | −21 | 27 |
| Row 2 | −11 | 13 | −5 | 11 | 13 | 5 |
| Row 3 | −19 | −19 | 19 | −19 | 19 | 19 |
e.g. M11 = 7·4 − (−1)(1) = 29, M12 = 6·4 − (−1)(−3) = 21, M21 = (−2)(4) − 3·1 = −11. Check: det A = 1·29 + (−2)(−21) + 3·27 = 29 + 42 + 81 = 152 ✓.
Q5 – Rank and nullity
[ 1 4 5 6 ] R2-3R1, R3+R1, R4-2R1 [ 1 4 5 6 ]
[ 3 -2 1 4 ] ----------------------> [ 0 -14 -14 -14 ]
[-1 0 -1 -2 ] [ 0 4 4 4 ]
[ 2 3 5 7 ] [ 0 -5 -5 -5 ]
R2/(-14): [0 1 1 1]; R3-4R2 = 0; R4+5R2 = 0
RREF: [ 1 0 1 2 ]
[ 0 1 1 1 ]
[ 0 0 0 0 ]
[ 0 0 0 0 ]Two non-zero rows ⇒ rank = 2. Number of columns = 4, so nullity = 4 − 2 = 2 (rank–nullity theorem). Null space basis: x3, x4 free → (−1, −1, 1, 0) and (−2, −1, 0, 1).
Q6 – LU decomposition
A = [4 4 0; 8 6 2; −4 −10 8]. Eliminate: R2 − 2R1 (l21 = 2) → [0 −2 2]; R3 + R1 (l31 = −1) → [0 −6 8]; R3 − 3R2 (l32 = 3) → [0 0 2].
L = [1 0 0; 2 1 0; −1 3 1], U = [4 4 0; 0 −2 2; 0 0 2]. Check LU: row 2 = 2(4 4 0) + (0 −2 2) = (8 6 2) ✓; row 3 = −(4 4 0) + 3(0 −2 2) + (0 0 2) = (−4 −10 8) ✓.
Q7 – Inverse of the same matrix
det A = det U = 4 × (−2) × 2 = −16.
Cofactors: C11 = 6·8 − 2·(−10) = 68, C12 = −(8·8 − 2·(−4)) = −72, C13 = 8(−10) − 6(−4) = −56; C21 = −(4·8 − 0) = −32, C22 = 4·8 − 0 = 32, C23 = −(4(−10) − 4(−4)) = 24; C31 = 4·2 − 0·6 = 8, C32 = −(4·2 − 0·8) = −8, C33 = 4·6 − 4·8 = −8.
adj A = [68 −32 8; −72 32 −8; −56 24 −8]; A−1 = adj A / (−16) = [−17/4 2 −1/2; 9/2 −2 1/2; 7/2 −3/2 1/2].
All results were checked with SymPy.
