Cokernel compatibility equations (source code)

= Cokernel compatibility equations
{title2=$Ax=b\text{ solvable}\iff y^*b=0\ \forall y\in\ker A^*$}

For a <matrix> $A$ over the <complex numbers> with the standard <Hermitian inner product>, the <linear system> $Ax=b$ is solvable exactly when
$$
y^*b=0\qquad\text{for every }y\in\ker A^*.
$$
The star is the <conjugate transpose>; for <matrices> over the <real numbers>, use the <transpose>. Necessity follows from $y^*Ax=(A^*y)^*x=0$. For sufficiency, $(\operatorname{im}A)^\perp=\ker A^*$, and taking the <orthogonal complement> again recovers $\operatorname{im}A$ in finite <dimension>. This is the <cokernel> obstruction expressed as scalar equations. https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/resources/lecture-10-the-four-fundamental-subspaces/[Gilbert Strang, MIT 18.06, Lecture 10: the four fundamental subspaces]{ref}

For $A=\begin{pmatrix}1&2\\0&0\end{pmatrix}$, $\ker A^T=\operatorname{span}\{(0,1)\}$, so the single compatibility equation is $b_2=0$. If it holds, the <kernel> supplies the remaining input freedom; if it fails, changing the input cannot remove the obstruction.