0
$\begingroup$

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}$?

$\endgroup$
5
  • $\begingroup$ It should turn into the first choice if you represent vectors by column vectors. $\endgroup$
    – Tunococ
    Mar 24, 2014 at 19:28
  • $\begingroup$ Are you sure? The post has been edited. I'm worried you may have the matrix dimensions backwards.. $\endgroup$ Mar 24, 2014 at 19:36
  • $\begingroup$ 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. $\endgroup$
    – Tunococ
    Mar 24, 2014 at 19:40
  • $\begingroup$ They are in columns $\endgroup$ Mar 24, 2014 at 19:44
  • $\begingroup$ Then you have had my answer from the beginning. $\endgroup$
    – Tunococ
    Mar 24, 2014 at 19:48

1 Answer 1

1
$\begingroup$

A rectangular matrix has a left and a right basis. Both can be completed to an orthogonal set (gram-schmidt or something similar).

If you want to understand this better, take a look at the SVD decomposition. It does precisely that (and more): it presents a rectangular matrix as a succession of three transformations: decomposition in the right basis, scale in this basis, and mapping to the vectors of the left basis:

$$A=U\Sigma V^T$$

where $U$ and $T$ are orthonormal.

$\endgroup$
4
  • $\begingroup$ I just need to know if the first or second possible answer is correct. $\endgroup$ Mar 24, 2014 at 19:37
  • $\begingroup$ Depends what you mean by that. As said, a rectangular matrix maps from one space to another space of different dimension: each has its own basis! You have to specify if your basis vectors are in rows or columns of your matrix. You take the one that hase the same dimension as your vectors. $\endgroup$
    – orion
    Mar 24, 2014 at 19:39
  • $\begingroup$ they are in columns $\endgroup$ Mar 24, 2014 at 19:43
  • $\begingroup$ Then extend to 4x4 and you have a complete basis for a 4-dimensional space which include your initial two vectors. $\endgroup$
    – orion
    Mar 24, 2014 at 19:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .