2
$\begingroup$

After QR decomposition of a matrix, $M$, the columns of Q are orthonormal. Is it possible after obtaining Q, we recover unnormalized column vectors from $Q$? For example, the matrix M has the following $Q$ matrix.

$M= \begin{bmatrix}1&-1&4\\1&4&-2\\1&4&2\\1&-1&0 \end{bmatrix}$

The $Q$ matrix is

$Q=\begin{bmatrix}0.5& -0.5& 0.5\\0.5& 0.5& -0.5\\0.5& 0.5& 0.5\\0.5&-0.5&-0.5 \end{bmatrix}$

This is for a certain application in spectroscopy. The process is as follows using Gram-Schmidt method.

The raw data is an experimental spectroscopy data. In general, we will have background signals, call them v1, v2, v3 as column vectors. Now measure the spectrum of the molecule of interest. This vector is m. Orthonormalize v1,v2 and v3 to obtain e1, e2 and e3. The magnitude of e1,e2,and e3 is 1. I am following the notation of Wikipedia's article on Gram-Schmidt Wiki.

Then here comes the key step: After an orthonormal basis set of e1, e2, and e3 has been obtained, from the background spectra, measure the spectrum of molecule of interest. This vector is $m$.

Now orthogonalize $m$, with respect to e1,e2, and e3 to obtain another vector $u$. In other words, the dot product u.e1=u.e2=u.e3 = 0.

Since $u$ has not been normalized, i.e., it has a length given by sqrt($u.u$). The length of $u$ is of interest for measurement purposes.

I wanted to know if this is possible by QR method or not?

$\endgroup$
0

1 Answer 1

3
$\begingroup$

It looks like you want $m - QQ^Tm$, is that correct?

$\endgroup$
9
  • $\begingroup$ @Federico, I am getting a memory error in MATLAB for Q*Q' where the prime is the transpose. My actual data is several thousand points and it says 47 GB memory required. Q is unfortunately 80000x5. $\endgroup$
    – ACR
    Commented Dec 15, 2021 at 16:59
  • $\begingroup$ I tried a very small matrix, and you are right it works, but with large data, say, 80000 points, MATLAB is giving a memory error of 47 GB requirement. $\endgroup$
    – ACR
    Commented Dec 15, 2021 at 17:22
  • $\begingroup$ [email protected] Use the thin QR, [Q, R] = qr(M, 0), and associate from the right, Q*(Q'*m). $\endgroup$ Commented Dec 15, 2021 at 18:23
  • $\begingroup$ @FedericoPoloni, Thank you. $\endgroup$
    – ACR
    Commented Dec 15, 2021 at 18:55
  • 1
    $\begingroup$ @M.Farooq Formulas (6.6) and (8.3). They're not applied to a vector, but (8.3) is basically the operator that I suggested. $\endgroup$ Commented Dec 17, 2021 at 7:24

You must log in to answer this question.

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