Linear Algebra Exam
1. a) State the Second Fundamental Theorem of Subspace: If $W$ is a subspace of $V$, then $W$ must be closed under vector addition and scalar multiplication, and contain the zero vector.
(i) Check if $W = \{(a,b,c) : a \geq 0\}$ is a subspace of $V=\mathbb{R}^3$:
- Zero vector $(0,0,0)$ has $a=0 \geq 0$, so $0 \in W$.
- Check closure under addition: Take $u = (1,0,0)$ and $v = (-1,0,0)$ both in $W$? $u$ has $a=1\geq0$ so $u \in W$, but $v$ has $a=-1<0$, so $v \notin W$.
- Thus addition of two vectors in $W$ is not always defined because $v$ is not in $W$, so consider addition only for $u, u$ in $W$.
- However, scalar multiplication fails: Multiply $u=(1,0,0) $ by scalar $-1$, we get $(-1,0,0)$ which has $a=-1<0$, not in $W$.
Therefore, $W$ is not closed under scalar multiplication, so $W$ is not a subspace.
(ii) Check if $W=\{(a,b,c): a^2 + b^2 + c^2 \leq 1\}$ is a subspace:
- Check zero: $(0,0,0)$ satisfies $0\leq1$, so $0\in W$.
- Closure under addition: Take $u=(1,0,0), v=(1,0,0)$ in $W$ because each has norm $1$.
- Their sum is $(2,0,0)$ with norm $2 > 1$, not in $W$.
- Closure under scalar multiplication: Multiply $u$ by scalar $2$, get $(2,0,0)$ not in $W$.
Therefore, $W$ is not a subspace.
b) Express $v=(5,9,5)$ as a linear combination of $v_1=(2,1,4)$, $v_2=(1,-1,3)$ and $v_3=(3,2,5)$:
Let $v = x v_1 + y v_2 + z v_3$.
So, $5 = 2x + y + 3z$
$9 = x - y + 2z$
$5 = 4x + 3y + 5z$
Solve system:
From first: $5 = 2x + y + 3z$
From second: $9 = x - y + 2z$
Add first and second: $14 = 3x + 5z$
From third: $5 = 4x + 3y + 5z$
Express $y$ from first: $y = 5 - 2x -3z$
Substitute $y$ into third:
$5=4x +3(5-2x-3z) + 5z = 4x + 15 -6x -9z +5z = -2x +15 - 4z$
Rearranged: $-2x - 4z = 5 -15 = -10$
Divide by -2: $x + 2z =5$
From earlier: $14=3x +5z$
Substitute $x=5 -2z$ into this:
$14 = 3(5 -2z) + 5z = 15 -6z +5z = 15 - z$
$z = 15 - 14 =1$
Then $x = 5 - 2(1) = 3$
$y = 5 - 2(3) - 3(1) = 5 - 6 -3 = -4$
Therefore, $v = 3 v_1 - 4 v_2 + 1 v_3$.
2. a) Show $S=\{(1,0,0),(0,1,0),(0,0,1),(1,1,1)\}$ spans $\mathbb{R}^3$ but is not independent:
- Standard basis vectors $(1,0,0), (0,1,0), (0,0,1)$ span $\mathbb{R}^3$.
- Adding $(1,1,1)$ does not reduce span.
- Check dependence:
Suppose $a(1,0,0) + b(0,1,0) + c(0,0,1) + d(1,1,1) = (0,0,0)$.
This gives:
$a + d =0$
$b + d =0$
$c + d =0$
From these, $a=b=c = -d$.
If $d\neq 0$, then not all coefficients are zero but sum zero vector, so vectors are dependent.
b) Check if $u_1 = (1,2,3)$ and $u_2 = (2,4,6)$ form a basis of $\mathbb{R}^3$.
- Number of vectors is 2, dimension of $\mathbb{R}^3$ is 3, so cannot be a basis.
- Also, $u_2 = 2 u_1$, so vectors are linearly dependent.
Hence, $\{u_1, u_2\}$ is not a basis of $\mathbb{R}^3$.
3. a) Show $T: \mathbb{R}^3 \to \mathbb{R}^3, T(x,y,z) = (x+2y -z, y - x, x - z)$ is linear:
Check additivity and homogeneity:
Let $u=(x_1,y_1,z_1)$ and $v=(x_2,y_2,z_2)$.
$T(u+v) = T(x_1+x_2, y_1+y_2, z_1+z_2) = ((x_1+x_2)+2(y_1+y_2)-(z_1+z_2), (y_1+y_2)-(x_1+x_2), (x_1+x_2) - (z_1+z_2)) = (x_1+2y_1 -z_1, y_1 - x_1, x_1 - z_1) + (x_2 + 2y_2 - z_2, y_2 - x_2, x_2 - z_2) = T(u) + T(v)$.
Similarly, for scalar $c$, $T(cu) = cT(u)$.
Hence, $T$ is linear.
Find basis and dimension of $Im(T)$:
Matrix of $T$ w.r.t standard basis is:
$$
\begin{bmatrix}
1 & 2 & -1 \\
-1 & 1 & 0 \\
1 & 0 & -1
\end{bmatrix}
$$
The image is span of its columns.
Check rank:
By Gaussian elimination, rank is 3, so $\dim(Im(T))=3$, so image is $\mathbb{R}^3$.
Find $Ker(T)$: Solve $T(x,y,z) = (0,0,0)$:
Equations:
$x + 2y - z = 0$
$y - x = 0$
$x - z = 0$
From second: $y = x$
From third: $z = x$
Substitute into first:
$x + 2x - x = 2x = 0 \implies x=0$
Thus $x=y=z=0$
Therefore, $Ker(T) = \{0\}$ and its dimension is 0.
b) Let $T(x,y,z) = (2x, 4x - y, 2x + 3y - z)$.
Show $T$ invertible:
Write matrix:
$$
A = \begin{bmatrix} 2 & 0 & 0 \\ 4 & -1 & 0 \\ 2 & 3 & -1 \end{bmatrix}
$$
Check $det(A)$:
$det(A) = 2(-1 \cdot -1 - 0 \cdot 3) - 0 + 0 = 2(1) = 2 \neq 0$
Since determinant non-zero, $T$ is invertible.
Find $T^{-1}$:
Let $T(x,y,z) = (a,b,c)$, so
$a = 2x$
$b = 4x - y$
$c = 2x + 3y - z$
From first: $x = \frac{a}{2}$.
From second: $b = 4x - y \implies y = 4x - b = 2a - b$.
From third: $c = 2x + 3y - z \implies z = 2x + 3y - c = a + 3(2a - b) - c = a + 6a - 3b - c = 7a - 3b - c$.
Hence,
$$
T^{-1}(a,b,c) = \left(\frac{a}{2}, 2a - b, 7a - 3b - c \right)
$$
4. a) Find eigenvalues and eigenvectors for
$$
A = \begin{bmatrix}1 & 4 \\ 9 & 1 \end{bmatrix}
$$
Eigenvalues satisfy:
$$
\det(A - \lambda I) = 0 \implies (1 - \lambda)^2 - 36 = 0
$$
Expand:
$$
(1 - \lambda)^2 = 36 \implies (1-\lambda) = \pm 6
$$
So,
$1 - \lambda = 6 \implies \lambda = -5$, and
$1 - \lambda = -6 \implies \lambda = 7$.
Eigenvalues: $\lambda_1 = -5$, $\lambda_2 = 7$.
Find eigenvectors:
For $\lambda = -5$:
$(A + 5I)v = 0 \implies \begin{bmatrix}6 & 4 \\ 9 & 6\end{bmatrix} \begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}0 \\ 0\end{bmatrix}$
Equations:
$6x + 4y = 0$
$9x + 6y = 0$
From the first: $4y = -6x \implies y = -\frac{3}{2}x$.
Eigenvector:
$$
v_1 = \begin{bmatrix}1 \\ -\frac{3}{2} \end{bmatrix}
$$
For $\lambda = 7$:
$A - 7I = \begin{bmatrix} -6 & 4 \\ 9 & -6 \end{bmatrix}$
Equations:
$-6x + 4y = 0 \implies 4y = 6x \implies y = \frac{3}{2}x$
Similarly from second equation confirm.
Eigenvector:
$$
v_2 = \begin{bmatrix}1 \\ \frac{3}{2} \end{bmatrix}
$$
b) For
$$
A = \begin{bmatrix}2 & -1 \\ 1 & 0 \end{bmatrix}
$$
verify Cayley-Hamilton theorem.
Characteristic polynomial:
$$
\det(A - \lambda I) = (2 - \lambda)(0 - \lambda) - (-1)(1) = -\lambda(2 - \lambda) + 1 = \lambda^2 - 2 \lambda + 1
$$
The polynomial is:
$$
\chi_A(\lambda) = \lambda^2 - 2\lambda + 1
$$
According to Cayley-Hamilton, matrix satisfies:
$$
A^2 - 2A + I = 0
$$
Calculate $A^2$:
$$
A^2 = \begin{bmatrix}2 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix}2 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} (2)(2) + (-1)(1) & (2)(-1) + (-1)(0) \\ (1)(2) + (0)(1) & (1)(-1) + (0)(0) \end{bmatrix} = \begin{bmatrix}4 -1 & -2 + 0 \\ 2 + 0 & -1 + 0 \end{bmatrix} = \begin{bmatrix}3 & -2 \\ 2 & -1 \end{bmatrix}
$$
Now compute $A^2 - 2A + I$:
$$
\begin{bmatrix}3 & -2 \\ 2 & -1 \end{bmatrix} - 2 \begin{bmatrix}2 & -1 \\ 1 & 0 \end{bmatrix} + \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix}3 & -2 \\ 2 & -1 \end{bmatrix} - \begin{bmatrix}4 & -2 \\ 2 & 0 \end{bmatrix} + \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}
$$
$$
= \begin{bmatrix}3 - 4 + 1 & -2 + 2 + 0 \\ 2 - 2 + 0 & -1 - 0 + 1 \end{bmatrix} = \begin{bmatrix}0 & 0 \\ 0 & 0 \end{bmatrix}
$$
Hence verified.
5. Find LU decomposition and solve system:
$$
\begin{cases}
2x + 6y + 2z = 2 \\
-3x - 8y = 2 \\
4x + 9y + 2z = 3
\end{cases}
$$
Coefficient matrix:
$$
A = \begin{bmatrix}2 & 6 & 2 \\ -3 & -8 & 0 \\ 4 & 9 & 2 \end{bmatrix}, \quad b = \begin{bmatrix}2 \\ 2 \\ 3 \end{bmatrix}
$$
Step 1: LU decomposition (Doolittle method):
Initialize
$L = \begin{bmatrix}1 & 0 & 0 \\ l_{21} & 1 & 0 \\ l_{31} & l_{32} & 1 \end{bmatrix},
U = \begin{bmatrix}u_{11} & u_{12} & u_{13} \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33} \end{bmatrix}$
Compute $u_{11} = a_{11} = 2$
$l_{21} = a_{21} / u_{11} = -3 / 2 = -1.5$
$l_{31} = a_{31} / u_{11} = 4 / 2 = 2$
$u_{12} = a_{12} = 6$
$u_{13} = a_{13} = 2$
Calculate $u_{22} = a_{22} - l_{21} u_{12} = -8 - (-1.5)(6) = -8 + 9 = 1$
$u_{23} = a_{23} - l_{21} u_{13} = 0 - (-1.5)(2) = 3$
$l_{32} = (a_{32} - l_{31} u_{12}) / u_{22} = (9 - 2*6)/1 = (9 - 12)/1 = -3$
$u_{33} = a_{33} - l_{31} u_{13} - l_{32} u_{23} = 2 - 2 * 2 - (-3) * 3 = 2 - 4 + 9 = 7$
Final matrices:
$$
L = \begin{bmatrix}1 & 0 & 0 \\ -1.5 & 1 & 0 \\ 2 & -3 & 1 \end{bmatrix},
U = \begin{bmatrix}2 & 6 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 7 \end{bmatrix}
$$
Solve $Ly = b$:
$y_1 = 2$
$-1.5 y_1 + y_2 = 2 \implies -1.5(2) + y_2 = 2 \implies y_2 = 2 + 3 = 5$
$2 y_1 -3 y_2 + y_3 = 3 \implies 2(2) - 3(5) + y_3 = 3 \implies 4 -15 + y_3 = 3 \implies y_3 = 3 + 11 = 14$
Solve $Ux = y$:
$7 z = 14 \implies z = 2$
$1 y + 3 z = 5 \implies y + 3(2) = 5 \implies y = -1$
$2 x + 6 y + 2 z = 2 \implies 2 x + 6(-1) + 2(2) = 2 \implies 2x -6 +4 = 2 \implies 2x -2 = 2 \implies 2x=4 \implies x=2$
Solution: $x=2, y=-1, z=2$