Suppose I'm given a vector $\vec x$. Is there a straightforward way to construct a symmetric postive semidefinite matrix A such that $\vec x$ is its nullspace?
That is, given $\vec x$ I need to create an $A$ such that $A\vec x=0$.
If $A$ doesn't have constraints its not difficult to construct such an $A$: namely, take all the rows of $A$ to be orthogonal to $\vec x$. But satisfying the symmetric, positive semidefinite condition makes this more challenging.
You can always take $A = 0$. For a non-trivial construction, assuming $n > 1$, you can choose some vector $\vec{y}$ which is orthogonal to $\vec{x}$ and take $A = \vec{y} \cdot \vec{y}^T$. This is a symmetric rank-one matrix and $$ A\vec{x} = \vec{y} \cdot \vec{y}^T \cdot \vec{x} = \left< \vec{y}, \vec{x} \right> \vec{y} = 0 \cdot \vec{y} = \vec{0}. $$