Given a subspace of $\mathbb{R}^n$, which linear systems correspond to it? 
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$?
 A: first of all, a matrix is just a linear map, so lets work with that. 
Now all you wrote is good, however you can also do this with the quotient map $\pi : \mathbb{R}^n \to \mathbb{R}^n/U$ and a subsequent choice of basis on $\mathbb{R}^n/U$. So you do not need to use an inner product (which you would need to choose otherwise).
now this is indeed not unique, as every automorphism $f$ of $\mathbb{R}^n/U $would yield a new map $f \circ \pi : \mathbb{R}^n \to \mathbb{R}^n/U $, with the same property.
intrestingly your first realization is actually very important, as precisely like that one can see that every subspace is a kernel and every kernel is a subspace! 
A: 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.
