SVD of row matrix

1.2k Views Asked by At

I need to calculate orthogonal basis of a row vector. I plan to implement it on hardware using RT coding.

Whats best algorithm to calculate SVD for say $1*8$ vector?

I implemented:

  1. QR decomposition block
  2. SVD of square matrix

Can I use on or both of these resources to get $8*7$ size, orthonormal basis using SVD?

2

There are 2 best solutions below

7
On BEST ANSWER

Here's how you can construct a suitable orthonormal basis using a Householder transformation: let $w_1$ denote the vector (a column-vector) in question, which is supposed to be the first vector in our orthonormal basis. Suppose that $\|w_1\| = 1$. Let $$ v = w_1 - e_1 = w_1 - (1,0,\dots,0) $$ Take your matrix to be $$ W = I - 2\frac{vv^\dagger}{v^\dagger v} $$ $W$ will necessarily be a unitary matrix whose first column is $w_1$. That is, the columns of $W$ form an orthonormal basis.

4
On

A row vector (i.e. $1-$by-$N$ matrix) is already essentially in SVD form. To see this, think of the (reduced) SVD of $A$ as follows:

$$ A = \sum_{j=1}^r\sigma_ju_jv_j^T $$ i.e. write $A$ as the sum of rank-one matrices. So if $A$ is a single row vector (i.e. a $1$-by-$N$ matrix), say $A = w^T$, then it can be written as

$$ A = \|w\|_2v^T,\quad v = \frac{w}{\|w\|_2} $$ so the only nonzero singular value of $A$ is $\|w\|_2$, and the corresponding singular vector is just the normalized version of $w$. If you want a full SVD of $A$, you'll need to construct an orthonormal basis for $w^\perp$ using e.g. Householder.