Let $U$ be a subspace of $\mathbb{R}^n$. Which systems of linear equations $Ax = b$ have $U$ as their solution set?
Here is my attempt:
Observe that we must have $b = 0$, because otherwise $x = 0$ isn’t a solution, meaning the solution set cannot be a subspace. So we may only consider homogeneous linear systems. In particular, the orthogonal projection onto $U^\perp$ has $U$ as its kernel. So if $P$ is the matrix of this map, then $Px = 0$ has $U$ as its solution set. So this is one answer. The question I now have is: is this the only possible answer (i.e. is it unique)? In other words, if $Ax = 0$ has $U$ as its solution set, must $A$ be the orthogonal projection onto $U^\perp$?
Your observation that $U$ must be the kernel of some linear transformation is the key. Now recall that the row space of a matrix annihilates its kernel, i.e., it is the orthogonal complement of the kernel. Thus, any matrix $A$ whose row space is $U^\perp$ works. It need not even be a square matrix as you’ve constructed. The minimum number of rows that $A$ must have is of course given by the rank-nullity theorem.
This harkens back to the two basic ways of constructing a subspace of an $n$-dimensional vector space that I describe in this answer and elsewhere: additively, as the sum of one-dimensional subspaces spanned by some set of vectors; or subtractively, as the intersection of $(n-1)$-dimensional subspaces annihilated by a set of covectors. A system of homogeneous linear equations corresponds to the latter: the solution set of each individual equation is a hyperplane and the overall solution is the intersection of those hyperplanes.