# Getting a subdecomposition (LU) of a submatrix

Assuming that a LU decomposition exists for all desired submatrices of a matrix a, is there an easy way to extract the decomposition for the submatrix from the decomposition of a? It is easy in this example:

julia> using LinearAlgebra

julia> a = randn(10,10);

julia> a2 = a[1:5,1:5];

julia> P = lu(a, NoPivot());

julia> P2 = lu(a2, NoPivot());

julia> P.factors[1:5,1:5] ≈ P2.factors
true


In that way I can compute the decomposition of the large matrix a once and then simply view the decomposition for each desired submatrix.

My question is: Can I do the same when I do not want the submatrix with indices 1:n, but arbitrary subindices. It would be good also, I guess, if NoPivot() is not a requirement. And most importantly: can I do this for the UMFPACK LU for sparse matrices?

Thank you for any help.

No. For example, consider the block matrix A = \begin{pmatrix} I & B \\ 0 & I \end{pmatrix}. An LU decomposition of A is simply L=I, U=A. Clearly, however, this provides no help at all in computing lu(B).

2 Likes