How to represent matrix as the sum of rank-one matrices If we're given $B$ to be a $4 \times 7$ matrix:
$$\begin{bmatrix}1 & 2 & -3 & 7 & 0 & -2 & 5\\1 & 2 & -3 & 7 & 1 & 3 & -2\\0 & 0 & 0 & 0 & 1 & 5 & -7\\0 & 0 & 0 & 0 & 0 & 0& 0\end{bmatrix}$$
I know that the rank is equal to 2. However I'm trying to find a way to represent $B$ as $B = u_1 v_1^T + u_2 v_2^T$ such that $u_1$ and $u_2$ are in $\mathbb R^4$ and $v_1$ and $v_2$ are in $R^7$. I'm having trouble formulating these vectors, can anyone help me figure out what they are?
 A: If we could write $B$ as a sum of two rank-one matrices, then we would not need to invoke singular value decompositions, because each rank-one matrix can easily be expressed as $u_1 v_1^T$ or $u_2 v_2^T$ respectively.
It might not always be possible to do this "by inspection", but a starting point here is to find a basis for the row space of $B$, which must be two-dimensional in keeping with $B$ having rank two.
One such basis is $\{(1,2,3,7,1,3,-2),(0,0,0,0,1,5,-7)\}$, which is a possible result you could get from the reduced row-echelon form of $B$, via elimination/elementary row operations.
Given the simple form of the first four columns of $B$ it is natural to subtract off a rank-one matrix that achieves equality there:
$$ B - \begin{bmatrix} 1 & 2 & 3 & 7 & 1 & 3 & -2
                    \\ 1 & 2 & 3 & 7 & 1 & 3 & -2
                    \\ 0 & 0 & 0 & 0 & 0 & 0 & 0
                    \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}
= \begin{bmatrix}      0 & 0 & 0 & 0 & -1 & -5 & 7
                    \\ 0 & 0 & 0 & 0 & 0 & 0 & 0
                    \\ 0 & 0 & 0 & 0 & 1 & 5 & -7
                    \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} $$
Thus $B = u_1 v_1^T + u_2 v_2^T$ when we take:
$$ u_1 = [1\; 1\; 0\; 0]^T, \; v_1^T = [1\; 2\; 3\; 7\; 1\; 3\; -2] $$
$$ u_2 = [-1\; 0\; 1\; 0]^T, \; v_2^T = [0\; 0\; 0\; 0\; 1\; 5\; -7] $$
Related: For real symmetric (square) matrices, it is possible to write the matrix as a sum of real symmetric rank-one "tensors" whose number agrees with the rank, without resorting to SVD methods.  This was the subject of Writing Real Symmetric Matrices as Linear Combination of Rank One Symmetric Terms $uu^T$  posed at SciComp.SE about two years ago.
A: One way to do this is to take the SVD (singular value decomposition) of the matrix $B$. This will give you $B = U \Sigma V^T$ for matrices $U$, $\Sigma$, $V$. Then, you can write $B= \sum_i \sigma_i u_i v_i^T$. 
