How to Derive U from L in O(n^2) Complexity?

In summary, the conversation discusses finding a method to calculate an upper triangular matrix U from a lower triangular matrix L such that L'*L=U'*U. The method involves using eigendecomposition on L'L to derive an orthogonal matrix M and a diagonal matrix D. The computational complexity of this method is O(n^3). The conversation also mentions the possibility of using a Cholesky factorization method, but it is likely that the fastest algorithm for this problem will still have a complexity of O(n^3).
  • #1
MRTRACKER
3
0
The problem is :

Given a lower triangular matrix L, how to calculate a upper triangular matrix U, such that L'*L=U'*U where L' and U' are transpose of matrix L and U respectively?
I am looking for a method which has less computational complexity, i.e., O(n^2) if the dimension of L is n.
 
Physics news on Phys.org
  • #2
L'L is symmetric positive definite, so it can be diagonalized with an orthogonal matrix M
(that is, M'L'LM = D where M^-1 = M' and D is diagonal with positive eigenvalues). So:

L'L = U'U
MDM' = U'U
D = M'U'UM = (UM)'(UM)

so, just put

UM = E
U = EM'

where E is the diagonal matrix whose eigenvalues are the square roots of the corresponding eigenvalues of D.

Hope it's clear :)
 
  • #3
Petr Mugver said:
L'L is symmetric positive definite, so it can be diagonalized with an orthogonal matrix M
(that is, M'L'LM = D where M^-1 = M' and D is diagonal with positive eigenvalues). So:

L'L = U'U
MDM' = U'U
D = M'U'UM = (UM)'(UM)

so, just put

UM = E
U = EM'

where E is the diagonal matrix whose eigenvalues are the square roots of the corresponding eigenvalues of D.

Hope it's clear :)

Thank u very much.
From your reply, I see the point is to derive M and D by eigendecomposing on L'L. In general , the computational complexity of eigendecompose is O(N^3). Do you have other ideas that could achieve O(N^2)?
The other thing is your method can not make sure U is an upper triangular matrix.

P.S., I knew the QR decomposition can solve this problem, but QR requires O(N^3) in MATLAB, i.e., [Q, U]=qr(L).
 
Last edited:
  • #4
You can do this in a similar way to the standard Cholesky factorization of a matrix, except you start with the last term and work backwards.

Let [itex]A = L' L = U' U[/itex] and multiply out the two products.

The last element [itex]A_{n,n}= U_{n,n}^2[/itex] so you can find [itex]U_{n,n}[/itex] in terms of the elements of [itex]L[/itex].

The element [itex]A_{n-1,n}[/itex] depends only on [itex]U_{n-1,n}[/itex] and [itex]U_{n,n}[/itex], so you can use it to find [itex]U_{n-1,n}[/itex].

You work backwards along the last row to [itex]A_{1,n}[/itex], then work along the next row starting with [itex]A_{n-1,n-1}[/itex], and finish at [itex]A_{1,1}[/itex]

If you haven't seen this before, it might help to write out the matrix products for 3x3 or 4x4 matrices in full.

This algorithm suggests very strongly that the fastest algorithm is [itex]O(n^3)[/itex], because if there was a faster algorithm, the same idea could be used for any matrix factorization.
 
  • #5
AlephZero said:
You can do this in a similar way to the standard Cholesky factorization of a matrix, except you start with the last term and work backwards.

Let [itex]A = L' L = U' U[/itex] and multiply out the two products.

The last element [itex]A_{n,n}= U_{n,n}^2[/itex] so you can find [itex]U_{n,n}[/itex] in terms of the elements of [itex]L[/itex].

The element [itex]A_{n-1,n}[/itex] depends only on [itex]U_{n-1,n}[/itex] and [itex]U_{n,n}[/itex], so you can use it to find [itex]U_{n-1,n}[/itex].

You work backwards along the last row to [itex]A_{1,n}[/itex], then work along the next row starting with [itex]A_{n-1,n-1}[/itex], and finish at [itex]A_{1,1}[/itex]

If you haven't seen this before, it might help to write out the matrix products for 3x3 or 4x4 matrices in full.

This algorithm suggests very strongly that the fastest algorithm is [itex]O(n^3)[/itex], because if there was a faster algorithm, the same idea could be used for any matrix factorization.

Thanks for your suggestion.
From this point, I might stop to looking for a [itex]O(n^2)[/itex] solution.
 

FAQ: How to Derive U from L in O(n^2) Complexity?

What is a triangular matrix?

A triangular matrix is a special type of matrix where all the elements above or below the main diagonal are equal to zero. Based on the position of the zeros, triangular matrices can be classified as upper triangular (zeros below the main diagonal) or lower triangular (zeros above the main diagonal).

How is a triangular matrix calculated?

To calculate a triangular matrix, we can use various methods such as Gaussian elimination, LU decomposition, or Cholesky decomposition. These methods involve performing row or column operations on the original matrix to transform it into a triangular form.

What are the applications of triangular matrix calculation?

Triangular matrices are commonly used in linear algebra and have various applications in fields such as engineering, computer science, and physics. They are used to solve systems of linear equations, perform matrix inversion, and represent data in a compressed form.

Can a non-square matrix be triangular?

No, a non-square matrix cannot be triangular as it does not have a main diagonal. Triangular matrices are only defined for square matrices where the number of rows and columns are equal.

What is the significance of triangular matrix calculation in machine learning?

In machine learning, triangular matrix calculation is used in algorithms such as Cholesky decomposition and QR decomposition to solve optimization problems and perform matrix factorization. This helps in reducing computational complexity and improving the efficiency of machine learning algorithms.

Back
Top