-1
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ The phrase "orthogonal basis of a row vector" is non-sense. It sounds like, given a vector $v_1$, you want to find an orthogonal basis $\{v_1,v_2,\dots,v_n\}$. Is that what you mean? $\endgroup$ – Omnomnomnom May 8 '17 at 18:27
  • $\begingroup$ I mean orthonormal basis of row vector $1*8$. It shall be a matrix of 8*8. $\endgroup$ – Jay May 8 '17 at 18:35
  • $\begingroup$ How can a vector have a basis? You don't seem to be using "basis" to mean what it usually means $\endgroup$ – Omnomnomnom May 8 '17 at 18:36
  • $\begingroup$ may be i should say row matrix. I need to find $W_2$ as mentioned in page 3 first paragraph of this paper: users.cecs.anu.edu.au/~xyzhou/papers/journal/tvt10.pdf This should be ideally 7*8 matrix. I can get that from full SVD where first row is normalised vector. $\endgroup$ – Jay May 8 '17 at 18:41
  • $\begingroup$ so yes, you did mean exactly what I said in that first comment. The only difference is that your $v$s are $w$s. $\endgroup$ – Omnomnomnom May 8 '17 at 19:11
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Thanks. This logic works very fine for a vector. Though deviation if I compare with matlab is 0.025 on average with larger error on 6th-8th columns and last row. Can this method be flexed to calculate $W$ foe 2*m matrix too? $\endgroup$ – Jay May 11 '17 at 7:11
  • $\begingroup$ I'm not sure what exactly you're comparing in Matlab. I'm not quite sure how to make this work for a $2 \times m$ matrix. $\endgroup$ – Omnomnomnom May 11 '17 at 12:14
  • $\begingroup$ I am comparing elements of orthogonal matrix from both methods. $\endgroup$ – Jay May 12 '17 at 4:49
  • $\begingroup$ I was saying that I don't know what you're doing in Matlab for comparison $\endgroup$ – Omnomnomnom May 12 '17 at 12:03
  • $\begingroup$ I am using SVD function of matlab. $\endgroup$ – Jay May 12 '17 at 15:10
0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ I actually need full SVD. I need to find $W_2$ as mentioned in page 3 first paragraph of this paper: users.cecs.anu.edu.au/~xyzhou/papers/journal/tvt10.pdf This should be ideally 7*8 matrix. I can get that from full SVD where first row is normalised vector. $\endgroup$ – Jay May 8 '17 at 18:36
  • $\begingroup$ Does having block of QR decomposition helps for getting full SVD, as it does involve householder? $\endgroup$ – Jay May 9 '17 at 8:44
  • $\begingroup$ @JayPrakash look at the other answer, it describes a simple method to get the full matrix. $\endgroup$ – icurays1 May 9 '17 at 18:35

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.