I want to compute this:
$$\begin{bmatrix} U\\ Y \end{bmatrix} = \begin{bmatrix} L_{11} &0 \\ L_{21} & L_{22} \end{bmatrix}\begin{bmatrix} Q_1\\ Q_2 \end{bmatrix}$$
Is this matlab command right then?
>> L = tril(qr([U;Y]))
The MATLAB command tril is lower-traingle function. Is this right way to compute the LQ - Decomposition?
The reason why I asking this simple question, is because a lot of books talking about LQ - Decomposition but not explaining how it's done.
Here is the answer - In MATLAB way!
Assume that we have matrix U and Y.
Then we want to solve this:
$$\begin{bmatrix} U\\ Y \end{bmatrix} = \begin{bmatrix} L_{11} &0 \\ L_{21} & L_{22} \end{bmatrix}\begin{bmatrix} Q_1\\ Q_2 \end{bmatrix}$$
Then we do this:
We rewrite variable L to this:
And we rewrite variable Q to this:
Now we check if [U;Y] = L*Q
Yes it is! Please, correct me if I'm wrong!