How can I find partial pivoting matrix $P$ from $PA=LU$ decomposition if we know $A,L,U$?

322 Views Asked by At

Assume that we have this equation

$$PA=LU$$

Where $A \in \Re^{mxn}$, $L \in \Re^{mxn}$ is a lower triangular matrix and $U \in \Re^{nxn}$ is an upper triangular matrix. $P \in \Re^{mxm}$ is the partial pivoting matrix.

In this case, $A,U,L$ are known. How can I find $P$?

Can I take

$$P = LUA^{\dagger}$$

?

1

There are 1 best solutions below

1
On BEST ANSWER

Yes, this is correct.

Your problem seems to be that LAPACK doesn't return the pivoting matrix, but a permutation vector. This thread might help: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=1747