Linear Algebra practice problems with worked solutions

Created 18 days ago, updated 18 days ago

Try each problem before expanding its solution. Check answers by substitution or multiplication.

1. An affine solution plane

Solve $x+2y-z=3$ and $2x+4y-2z=6$.

Worked solution

The second equation is redundant. Set $y=s,z=t$, giving
$$(x,y,z)=(3-2s+t,s,t)=(3,0,0)+s(-2,1,0)+t(1,0,1).$$
The coefficient matrix has rank one and nullity two. The nonhomogeneous solution set is an affine plane, not a subspace.

2. Test a basis

Do $(1,0,1)$, $(0,1,1)$, $(1,1,2)$ form a basis of $\mathbb R^3$?

Worked solution

No: the third vector is the sum of the first two. The first two are independent and form a basis of the plane $z=x+y$. The three-column matrix has rank two and a null vector $(-1,-1,1)^T$.

3. Change coordinates

For $B=((1,0),(1,1))$, find $[(5,3)]_B$.

Worked solution

Write $(5,3)=a(1,0)+b(1,1)=(a+b,b)$. Hence $b=3,a=2$ and the coordinate vector is $(2,3)^T$. The basis matrix $\begin{bmatrix}1&1\\0&1\end{bmatrix}$ converts these coordinates back to $(5,3)^T$.

4. Project onto a line

Project $v=(2,0)^T$ onto the span of $u=(1,1)^T$.

Worked solution

$$p=u\frac{u^Tv}{u^Tu}=(1,1)^T.$$
The residual is $(1,-1)^T$ and its dot product with $u$ is zero. The projection matrix is $\frac12\begin{bmatrix}1&1\\1&1\end{bmatrix}$.

5. Least-squares constant

Fit one constant to observations $1,2,4$.

Worked solution

Set $A=(1,1,1)^T$, $b=(1,2,4)^T$. The normal equation is $3c=7$, so $\hat c=7/3$. The residual is $(-4/3,-1/3,5/3)^T$, sums to zero, and has squared norm $14/3$.

6. Diagonalize or explain failure

Compare $A=\begin{bmatrix}2&1\\1&2\end{bmatrix}$ and $J=\begin{bmatrix}1&1\\0&1\end{bmatrix}$.

Worked solution

For $A$, eigenvalues are $3,1$, with eigenvectors $(1,1)^T,(1,-1)^T$. Normalize them as columns of $Q$ to obtain $A=Q\operatorname{diag}(3,1)Q^T$.

For $J$, the sole eigenvalue $1$ has algebraic multiplicity two but eigenspace $\operatorname{span}\{(1,0)^T\}$ of dimension one. It is not diagonalizable despite its characteristic polynomial splitting.

7. A small determinant

Does $\det A$ being tiny imply ill-conditioning when $A=10^{-8}I_3$?

Worked solution

No. The determinant is $10^{-24}$, but all singular values equal $10^{-8}$, so $\kappa_2(A)=1$. Compare $\operatorname{diag}(1,1,10^{-8})$, which has condition number $10^8$.

8. Complex inner product

For $x=(1,i)^T$ and $y=(i,1)^T$, compute $\langle x,y\rangle$ and both norms.

Worked solution

Using $\langle x,y\rangle=x^*y$, the value is $i-i=0$. Both norms are $\sqrt2$, so the vectors are orthogonal. Using $x^Ty$ would incorrectly give $2i$.

9. Markov orientation

For row-stochastic $P=\begin{bmatrix}0.9&0.1\\0.5&0.5\end{bmatrix}$ and initial column state $q_0=(1,0)^T$, what is $q_1$?

Worked solution

Use $q_1=P^Tq_0=(0.9,0.1)^T$. The wrong formula $Pq_0$ gives $(0.9,0.5)^T$, whose entries sum to $1.4$ and thus do not form a probability distribution. The stationary column state is $(5/6,1/6)^T$.

10. Generalized kernel and range

Let $T=\operatorname{diag}(J_2(0),2)$ on $\mathbb R^3$, where $J_2(0)=\begin{bmatrix}0&1\\0&0\end{bmatrix}$. Find the stabilized kernel and image.

Worked solution

$T^2=\operatorname{diag}(0,0,4)$. The stabilized kernel is $\operatorname{span}\{e_1,e_2\}$, and the stabilized image is $\operatorname{span}\{e_3\}$. They form a direct sum of the whole space. $T$ is nilpotent on the first part and invertible on the second.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.