# Basis of a matrix with zero rows

I'm trying to check whether B is a basis for $\mathbb{R}^m$. If B is not a basis, I want to use the matrix eye(m) from matlab to create a basis for $\mathbb{R}^m$ that will contain all vectors from B and some vectors from the matrix eye(m). I don't have issue with the matlab function coding, I have issue with what the right answer should be. For example: The matrix $\begin{bmatrix}1& 0\\ 0 &0\\ 0 & 0\\ 0 &1\end{bmatrix}$ turns into what? Does it turn into this: $$\begin{bmatrix}1 &0 &0 &0\\0 &0 &1 &0\\0 &0& 0 &1 \\ 0 & 1 & 0 & 0\end{bmatrix}$$ or this: $\begin{bmatrix}1 &0\\ 0 &1\end{bmatrix}$?

• It should turn into the first choice if you represent vectors by column vectors. Mar 24, 2014 at 19:28
• Are you sure? The post has been edited. I'm worried you may have the matrix dimensions backwards.. Mar 24, 2014 at 19:36
• I am sure about my answer. What I'm not sure is whether you use column vectors or row vectors. It is, however, more common to use column vectors in most text so that matrix multiplication would go on the left of a vector. Mar 24, 2014 at 19:40
• They are in columns Mar 24, 2014 at 19:44
• Then you have had my answer from the beginning. Mar 24, 2014 at 19:48

$$A=U\Sigma V^T$$
where $U$ and $T$ are orthonormal.