I am trying to solve this problem of finding matrix A, given null space.

Let u = $\begin{bmatrix}1 \\1 \\ 2\end{bmatrix}$ and v = $\begin{bmatrix}1 \\0 \\ -1\end{bmatrix}$. Find matrix A such that Nul A = Span {u, v}

I know that if you want to find A given only one vector (e.g. w) in Nul A, you just have to find all solutions Aw = 0. But what about two vectors? Should I find sum of them?

  • 1
    $\begingroup$ Do you have any restriction on the size of $A$? $\endgroup$ – 5xum Apr 10 '17 at 13:48
  • $\begingroup$ Nope. I don't think that it's about size of A. It will probably be 2 by 3 or 1 by 3. $\endgroup$ – oneturkmen Apr 10 '17 at 13:57

If the size doesn't matter, then let's look for a matrix $\begin{bmatrix}x & y &z\end{bmatrix}$ such that:

$$\begin{bmatrix}x & y &z\end{bmatrix}\begin{bmatrix}1 \\1 \\ 2\end{bmatrix}=0$$ $$\begin{bmatrix}x & y &z\end{bmatrix}\begin{bmatrix}1 \\0 \\ -1\end{bmatrix}=0$$

We get:

$$\begin{cases} x+y+2z=0 \\ x-z=0 \end{cases}$$ The solution of that system is $\text{sp}\{(1,-3,1)\}$.

So we can choose $A=\begin{bmatrix}1 & -3 &1\end{bmatrix}$

  • $\begingroup$ Thank you very much! I did not know that you can combine them under the system and just find x, y, z through row reduction. $\endgroup$ – oneturkmen Apr 10 '17 at 14:08
  • $\begingroup$ @alwaysone No problem. You should just remember what we're looking for: a matrix (vector in that case) such that the product of multiplication in the two vectors given will get us $0$. $\endgroup$ – Itay4 Apr 10 '17 at 14:11
  • $\begingroup$ Why not directly take for $A$ the cross product of $u$ and $v$ ? $\endgroup$ – Jean Marie Apr 10 '17 at 14:18

A solution is

$$P=\begin{pmatrix}\ \ 1&-3&\ \ 1\\ -3& \ \ \ 9&-3\\ \ \ 1&-3&\ \ 1\end{pmatrix}.$$

I obtained it as (a multiple of) the matrix of orthogonal projection on the line defined by vector $w=u \times v$ using the following (apparently complicated) formula:


(where $M:=(u|v)$ is the $3 \times 2$ matrix with columns $u$ and $v$).

Proof: We are going to prove that $Pu=0$ and $Pv=0$ at the same time by proving that $P(u|v)=0$ i.e. by proving that $PM=0$. The proof is straightforward:


  • $\begingroup$ This also works, but we did not reach that point in the course, where we cover orthogonality. Thanks anyway! I saved this method as well - might need it in future. $\endgroup$ – oneturkmen Apr 10 '17 at 14:14
  • $\begingroup$ This kind of matrix is very well known in the framework of what is called "least squares methods" $\endgroup$ – Jean Marie Apr 10 '17 at 14:17
  • $\begingroup$ Is it somehow related to "OLS" - "Ordinary Least Squares", from Statistics (regression)? $\endgroup$ – oneturkmen Apr 10 '17 at 14:18
  • $\begingroup$ I see our remarks have been sent almost at the same time... $\endgroup$ – Jean Marie Apr 10 '17 at 14:19

The vectors given are in the 3d-space, and they are linearly independent. So their span is some plane passing through the origin. Geometrically there is a unique line passing through the origin that is perpendicular to the plane. Take a point $(a,b,c)$ in that line. So the equation is $ax+by+cz=0$ which will be satisfied precisely by the span of $u$ and $v$. To find the vector $(a,b,c)$ perpendicular to given vectors $u$ and $v$ take their cross-product $u\times v$ as in JeanMarie's answer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.