A carefully developed collection of worked problems drawn from the themes of the supplied linear algebra and quantum computing materials. Each solution presents the mathematical setup, reasoning, result and interpretation.
1. Rank, nullity and special solutions
For a matrix $A\in\mathbb{R}^{m\times n}$, the rank–nullity theorem states
$$\operatorname{rank}(A)+\dim\ker(A)=n.$$
Worked problem. Determine the null space of
$$A=\begin{pmatrix}1&2&3\\2&4&6\end{pmatrix}.$$
The second row is twice the first, so there is one pivot and $\operatorname{rank}(A)=1$. The equation $Ax=0$ reduces to $x_1+2x_2+3x_3=0$. Set $x_2=s$ and $x_3=t$. Then
$$x=(-2s-3t,s,t)^T=s\begin{pmatrix}-2\\1\\0\end{pmatrix}+t\begin{pmatrix}-3\\0\\1\end{pmatrix}.$$
The two displayed vectors are linearly independent, hence form a basis of the null space. Its dimension is $2=3-1$. Check: substituting either basis vector into $Ax$ gives the zero vector.
2. Column space and solvability
The system $Ax=b$ is consistent precisely when $b$ belongs to the column space of $A$:
$$Ax=b\text{ is solvable}\iff b\in\operatorname{Col}(A)\iff\operatorname{rank}(A)=\operatorname{rank}([A\mid b]).$$
Worked problem. Take $A=\begin{pmatrix}1&2\\2&4\end{pmatrix}$. Its columns span the line $\{(t,2t)^T:t\in\mathbb R\}$. For $b=(3,6)^T$, the equation is $x_1+2x_2=3$, giving infinitely many solutions $(3-2t,t)^T$. For $b=(3,7)^T$, the augmented equations require both $x_1+2x_2=3$ and $2x_1+4x_2=7$, an impossibility. Interpretation: adding a right-hand-side column enlarges the column space exactly when the system is inconsistent.
3. Echelon form and parameter-dependent rank
Gaussian elimination applies elementary row operations that preserve the solution set and rank. A pivot identifies an independent row; a free variable gives a direction in the homogeneous solution space.
Worked example. Consider
$$A(q)=\begin{pmatrix}1&2\\2&q\end{pmatrix},\qquad R_2\leftarrow R_2-2R_1.$$
Then
$$A(q)\sim\begin{pmatrix}1&2\\0&q-4\end{pmatrix}.$$
If $q\ne4$, there are two pivots and $\operatorname{rank}A(q)=2$. If $q=4$, the second row vanishes and $\operatorname{rank}A(4)=1$. In the latter case $Ax=0$ has solutions $x=t(-2,1)^T$. Lesson: determine exceptional parameter values before dividing by a symbolic pivot.
4. Cofactors and determinant expansion
For a square matrix, deleting row $i$ and column $j$ gives the minor $M_{ij}$. The cofactor is $C_{ij}=(-1)^{i+j}\det M_{ij}$. Expansion along row $i$ yields
$$\det A=\sum_{j=1}^n a_{ij}C_{ij}.$$
Worked problem. Let
$$A=\begin{pmatrix}2&1&0\\3&4&1\\0&2&5\end{pmatrix}.$$
Expanding along the first row gives
$$\det A=2\begin{vmatrix}4&1\\2&5\end{vmatrix}-\begin{vmatrix}3&1\\0&5\end{vmatrix}=2(20-2)-15=21.$$
Because the determinant is nonzero, $A$ is invertible. Check: expansion along the third row gives $-2(2)+5(5)=21$.
5. Vandermonde determinants
A Vandermonde matrix has row $i$ equal to $(1,x_i,x_i^2,\ldots,x_i^{n-1})$. Its determinant is
$$\det V=\prod_{1\le i<j\le n}(x_j-x_i).$$
Worked problem. For nodes $2,3,6$,
$$V=\begin{pmatrix}1&2&4\\1&3&9\\1&6&36\end{pmatrix},\quad \det V=(3-2)(6-2)(6-3)=12.$$
The determinant vanishes exactly when two nodes coincide. Thus interpolation by a polynomial of degree at most $n-1$ is unique for distinct nodes.
6. Subspaces and dimension
A subspace $W$ of a vector space $V$ must be a subset of $V$, contain the zero vector, and be closed under addition and scalar multiplication.
Worked problem. The set $\mathbb R^2$ is not literally a subspace of $\mathbb R^3$: its vectors have two coordinates, not three. However the embedded plane
$$W=\{(x,y,0)^T:x,y\in\mathbb R\}\subseteq\mathbb R^3$$
is a subspace. It is the span of $(1,0,0)^T$ and $(0,1,0)^T$ and has dimension two. Distinction: abstract isomorphism and literal set inclusion are not the same claim.
7. Unitary matrices and phase constraints
A complex matrix is unitary when $U^\dagger U=I$; equivalently, its columns are orthonormal under the complex inner product.
Worked example. For
$$U=\frac1{\sqrt2}\begin{pmatrix}1&e^{i\alpha}\\1&-e^{i\alpha}\end{pmatrix},$$
the first column has squared norm $1$, the second has squared norm $1$, and their inner product is $(e^{i\alpha}-e^{i\alpha})/2=0$. Therefore $U^\dagger U=I$ for every real $\alpha$. Physical meaning: the operation preserves state norms and transition probabilities.
8. Phase matrix: orthogonality versus unitarity
For two complex column vectors $v_1,v_2$, orthogonality means $v_1^\dagger v_2=0$. Unitarity of $U=(v_1\ v_2)$ additionally requires $\|v_1\|=\|v_2\|=1$.
Worked example. Let
$$U=\frac1{\sqrt2}\begin{pmatrix}e^{i\phi_1}&e^{i\phi_2}\\e^{i\phi_3}&e^{i\phi_4}\end{pmatrix}.$$
Both columns are automatically normalized. Their inner product vanishes exactly when
$$e^{i(\phi_2-\phi_1)}+e^{i(\phi_4-\phi_3)}=0,$$
or, equivalently, $\phi_2-\phi_1-(\phi_4-\phi_3)\equiv\pi\pmod{2\pi}$. This is the phase condition for unitarity.
9. Pauli matrices and their commutant
The Pauli operators are
$$X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.$$
They satisfy $[X,Y]=2iZ$ and cyclic permutations. Worked problem: find all $2\times2$ matrices commuting with all three. Write $A=aI+bX+cY+dZ$. Since $[A,Z]=2i(cX-bY)$, commuting with $Z$ requires $b=c=0$. Then $[A,X]=2idY$ forces $d=0$. Therefore
$$[A,X]=[A,Y]=[A,Z]=0\quad\Longrightarrow\quad A=aI.$$
Only scalar multiples of the identity commute with every Pauli matrix.
10. Spectrum of a phase-flip matrix
Consider the Hermitian matrix
$$A(\phi)=\begin{pmatrix}0&e^{-i\phi}\\e^{i\phi}&0\end{pmatrix},\qquad \phi\in\mathbb R.$$
Direct multiplication gives $A^2=I$, so its eigenvalues satisfy $\lambda^2=1$. Its trace is zero, hence the eigenvalues are $+1$ and $-1$, one of each. It is Hermitian and unitary, has determinant $-1$, and rank two. An eigenvector for $\lambda=+1$ is $2^{-1/2}(e^{-i\phi},1)^T$; for $-1$, use $2^{-1/2}(-e^{-i\phi},1)^T$. Check: apply $A$ to either vector.
11. Square roots of Pauli operators
A square root of a matrix $P$ is any $S$ with $S^2=P$. For a Pauli operator $P\in\{X,Y,Z\}$, $P^2=I$. One unitary square root is
$$\sqrt P=\frac{1+i}{2}I+\frac{1-i}{2}P.$$
To verify, set $a=(1+i)/2$ and $b=(1-i)/2$. Then $(aI+bP)^2=(a^2+b^2)I+2abP=P$ because $a^2+b^2=0$ and $2ab=1$. For $P=I$, a square root is simply $I$. Caution: matrix square roots need not be unique.
12. CNOT: inverse, adjoint and Hermiticity
In the computational basis $\{|00\rangle,|01\rangle,|10\rangle,|11\rangle\}$, the controlled-NOT matrix is
$$C=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}.$$
It swaps $|10\rangle$ and $|11\rangle$ while leaving the other basis vectors fixed. The matrix is real and symmetric, so $C^\dagger=C$. Applying it twice restores every basis vector, so $C^2=I$ and
$$C^{-1}=C^\dagger=C.$$
Therefore CNOT is simultaneously unitary, Hermitian and self-inverse.
13. Hadamard action on two qubits
The Hadamard gate acts on the first qubit as
$$H|0\rangle=\frac{|0\rangle+|1\rangle}{\sqrt2},\qquad H|1\rangle=\frac{|0\rangle-|1\rangle}{\sqrt2}.$$
For $|\psi\rangle=\alpha_{00}|00\rangle+\alpha_{01}|01\rangle+\alpha_{10}|10\rangle+\alpha_{11}|11\rangle$,
$$\begin{aligned}(H\otimes I)|\psi\rangle=\frac1{\sqrt2}[&(\alpha_{00}+\alpha_{10})|00\rangle+(\alpha_{01}+\alpha_{11})|01\rangle\\+&(\alpha_{00}-\alpha_{10})|10\rangle+(\alpha_{01}-\alpha_{11})|11\rangle].\end{aligned}$$
The amplitudes interfere pairwise according to the first-qubit value; the second qubit is not directly acted on.
14. Hadamard measurement with an auxiliary system
Start with the normalized state
$$|\Psi\rangle=\frac{|0\rangle|\phi\rangle+|1\rangle|\psi\rangle}{\sqrt2},$$
where $|\phi\rangle$ and $|\psi\rangle$ are normalized. After $H$ acts on the first qubit,
$$|\Psi'\rangle=\frac12\bigl[|0\rangle(|\phi\rangle+|\psi\rangle)+|1\rangle(|\phi\rangle-|\psi\rangle)\bigr].$$
The probability of measuring first-qubit outcome $1$ is
$$p(1)=\frac14\|\phi-\psi\|^2=\frac12\left(1-\operatorname{Re}\langle\phi|\psi\rangle\right).$$
When the auxiliary states are equal, the outcome is impossible; when they are orthogonal, it occurs with probability $1/2$.
15. Parity projective measurement
Even and odd computational-basis parity correspond to the two orthogonal projectors
$$P_{\mathrm{even}}=|00\rangle\langle00|+|11\rangle\langle11|=\frac{I+Z\otimes Z}{2},$$
$$P_{\mathrm{odd}}=|01\rangle\langle01|+|10\rangle\langle10|=\frac{I-Z\otimes Z}{2}.$$
They satisfy $P_j^2=P_j$, $P_j^\dagger=P_j$, $P_{\mathrm{even}}P_{\mathrm{odd}}=0$, and $P_{\mathrm{even}}+P_{\mathrm{odd}}=I$. For $|\psi\rangle=\sum_{a,b}c_{ab}|ab\rangle$, the even outcome has probability $|c_{00}|^2+|c_{11}|^2$. The post-measurement state is $P_{\mathrm{even}}|\psi\rangle/\sqrt{p_{\mathrm{even}}}$ when that probability is nonzero.
16. Projectors in Simon’s algorithm
Measuring an $n$-qubit register in the computational basis is a projective measurement with $2^n$ outcomes. For each bit string $y\in\{0,1\}^n$ the projector is
$$P_y=|y\rangle\langle y|,\qquad \sum_{y\in\{0,1\}^n}P_y=I_{2^n}.$$
For a state $|\psi\rangle=\sum_y\alpha_y|y\rangle$, outcome $y$ occurs with probability $\langle\psi|P_y|\psi\rangle=|\alpha_y|^2$. In Simon’s algorithm the final register amplitudes have support only on bit strings satisfying $y\cdot s=0\pmod2$ (for the standard two-to-one promise with hidden string $s$). Repeating the circuit yields linear constraints on $s$.
17. Quantum Fourier transform in dimension three
Let $\omega=e^{2\pi i/3}$, so $1+\omega+\omega^2=0$. The three-dimensional quantum Fourier transform is
$$F_3=\frac1{\sqrt3}\begin{pmatrix}1&1&1\\1&\omega&\omega^2\\1&\omega^2&\omega\end{pmatrix}.$$
Applying it to a basis state gives
$$F_3|1\rangle=\frac{|0\rangle+\omega|1\rangle+\omega^2|2\rangle}{\sqrt3}.$$
All three computational-basis outcomes have probability $1/3$; the information is encoded in relative phases. Unitarity check: the inner product between the first and second columns is $(1+\omega+\omega^2)/3=0$, and every column has norm one.
18. Fourier transform of periodic sequences
For an $N$-point discrete Fourier transform, define
$$\widehat a_k=\frac1{\sqrt N}\sum_{\ell=0}^{N-1}a_\ell e^{2\pi i k\ell/N}.$$
Suppose $r$ divides $N$ and $a_{\ell+r}=a_\ell$. Write $N=Mr$ and $\ell=j+tr$ with $0\le j<r$ and $0\le t<M$. Then
$$\widehat a_k=\frac1{\sqrt N}\sum_{j=0}^{r-1}a_j e^{2\pi i kj/N}\sum_{t=0}^{M-1}e^{2\pi i kt/M}.$$
The final geometric sum vanishes unless $k$ is a multiple of $M=N/r$. Hence the Fourier spectrum is supported only at $k=0,M,2M,\ldots,(r-1)M$. This is the algebraic basis of period detection.
19. No-cloning theorem
Assume a unitary $U$ can copy any unknown pure state using a fixed blank state $|b\rangle$:
$$U(|\psi\rangle|b\rangle)=|\psi\rangle|\psi\rangle,\qquad U(|\phi\rangle|b\rangle)=|\phi\rangle|\phi\rangle.$$
Unitarity preserves inner products. Taking the inner product of the two input and output equations gives
$$\langle\psi|\phi\rangle=\langle\psi|\phi\rangle^2.$$
This forces the overlap to be $0$ or $1$; arbitrary distinct nonorthogonal states do not satisfy that requirement. Therefore no universal perfect cloner exists. Qualification: mutually orthogonal known-basis states can be copied, and approximate or probabilistic cloning has different limitations.
20. No-deleting and reversibility
Suppose a reversible unitary could delete one of two copies of any unknown state without transferring the information elsewhere:
$$U(|\psi\rangle|\psi\rangle|A\rangle)=|\psi\rangle|0\rangle|A'\rangle,$$
with the final ancilla independent of $|\psi\rangle$. For two input states, preservation of inner products requires
$$\langle\psi|\phi\rangle^2=\langle\psi|\phi\rangle\langle A'|A'\rangle=\langle\psi|\phi\rangle.$$
This fails for general nonorthogonal states. If the ancilla is allowed to retain state-dependent information, apparent deletion can be implemented by moving the information into the environment; it has not been fundamentally erased by a unitary. The key principle is reversibility of closed-system evolution.
21. Superdense coding
Alice and Bob share $|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt2$. Alice encodes two classical bits by applying one of $I,X,Z,XZ$ to her half. The resulting four states are orthogonal Bell states:
$$|\Phi^\pm\rangle=\frac{|00\rangle\pm|11\rangle}{\sqrt2},\qquad |\Psi^\pm\rangle=\frac{|01\rangle\pm|10\rangle}{\sqrt2}.$$
Alice sends her single qubit to Bob. Bob applies CNOT (Alice’s qubit as control) followed by Hadamard on the first qubit, then measures both in the computational basis. The four Bell states map to four distinguishable two-bit outcomes. Resource accounting: one transmitted qubit plus one previously shared entangled pair communicates two classical bits.
22. Remote preparation of a known qubit
Remote state preparation differs from teleportation because Alice knows a classical description of the desired state. For the equatorial family
$$|\psi_\theta\rangle=\frac{|0\rangle+e^{i\theta}|1\rangle}{\sqrt2},$$
Alice and Bob share $|\Phi^+\rangle$. Alice measures her half in the basis
$$|m_0\rangle=\frac{|0\rangle+e^{-i\theta}|1\rangle}{\sqrt2},\qquad |m_1\rangle=\frac{|0\rangle-e^{-i\theta}|1\rangle}{\sqrt2}.$$
Conditioned on outcome $0$, Bob has $|\psi_\theta\rangle$; conditioned on outcome $1$, he has $Z|\psi_\theta\rangle$. Alice sends one classical bit so Bob can apply $I$ or $Z$ accordingly. Scope: this one-bit scheme works for the specified known equatorial family, not arbitrary unknown qubit states.
23. Determinant-one matrices and special linear transformations
The group $SL(2,\mathbb R)$ contains real $2\times2$ matrices with determinant one. Examples are
$$A=\begin{pmatrix}1&t\\0&1\end{pmatrix},\quad B=\begin{pmatrix}1&0\\s&1\end{pmatrix},\quad C=\begin{pmatrix}r&0\\0&r^{-1}\end{pmatrix},\quad r\ne0.$$
Each has determinant one, so each is invertible and preserves oriented area in the plane. Their products also have determinant one because $\det(AB)=\det(A)\det(B)$. Distinction: determinant one does not imply orthogonality or unitarity.
24. An invertible matrix spans the entire output space
If $A\in\mathbb R^{8\times8}$ is invertible, then $\operatorname{rank}(A)=8$ and its eight columns form a basis of $\mathbb R^8$. Consequently
$$\operatorname{Col}(A)=\mathbb R^8.$$
For any $b\in\mathbb R^8$, the system $Ax=b$ has the unique solution $x=A^{-1}b$. Conversely, if the columns span $\mathbb R^8$, the matrix has full rank and is invertible. The same equivalence holds for any square $n\times n$ matrix.