Skip to main content
than -> then
Source Link
Bill Barth
  • 10.9k
  • 1
  • 22
  • 39

If you compute the LU factorization of an $n$ by $n$ matrix $A$, then you'll end up with

$PA=LU$

where $P$ is a permutation matrix, $L$ is lower triangular and nonsingular, and $U$ is upper triangular. If $A$ happens to singular thanthen the LAPACK routine will produce a $U$ matrix that is singular. The only way that an upper triangular matrix can be singular is to have a diagonal entry which is 0 (the determinant of $U$ is the product of its diagonal entries.) The info value returned by the LAPACK routine tells you the row/column of the first 0 on the diagonal of $U$.

You could use this information (for example) to find a nonzero vector $\hat{x}$ such that $U\hat{x}=0$. Suppose that info is $k$. Then let $\hat{x}_{j}=0$ for $j=n, n-1, \ldots, k+1$. Let $\hat{x}_{k}=1$. Then use back substitution to find $\hat{x}_{k-1}, \hat{x}_{k-2}, \ldots, \hat{x}_{1}$.

Then $LU\hat{x}=0$, so $\hat{x}$ is in the null space of $PA$.

If you compute the LU factorization of an $n$ by $n$ matrix $A$, then you'll end up with

$PA=LU$

where $P$ is a permutation matrix, $L$ is lower triangular and nonsingular, and $U$ is upper triangular. If $A$ happens to singular than the LAPACK routine will produce a $U$ matrix that is singular. The only way that an upper triangular matrix can be singular is to have a diagonal entry which is 0 (the determinant of $U$ is the product of its diagonal entries.) The info value returned by the LAPACK routine tells you the row/column of the first 0 on the diagonal of $U$.

You could use this information (for example) to find a nonzero vector $\hat{x}$ such that $U\hat{x}=0$. Suppose that info is $k$. Then let $\hat{x}_{j}=0$ for $j=n, n-1, \ldots, k+1$. Let $\hat{x}_{k}=1$. Then use back substitution to find $\hat{x}_{k-1}, \hat{x}_{k-2}, \ldots, \hat{x}_{1}$.

Then $LU\hat{x}=0$, so $\hat{x}$ is in the null space of $PA$.

If you compute the LU factorization of an $n$ by $n$ matrix $A$, then you'll end up with

$PA=LU$

where $P$ is a permutation matrix, $L$ is lower triangular and nonsingular, and $U$ is upper triangular. If $A$ happens to singular then the LAPACK routine will produce a $U$ matrix that is singular. The only way that an upper triangular matrix can be singular is to have a diagonal entry which is 0 (the determinant of $U$ is the product of its diagonal entries.) The info value returned by the LAPACK routine tells you the row/column of the first 0 on the diagonal of $U$.

You could use this information (for example) to find a nonzero vector $\hat{x}$ such that $U\hat{x}=0$. Suppose that info is $k$. Then let $\hat{x}_{j}=0$ for $j=n, n-1, \ldots, k+1$. Let $\hat{x}_{k}=1$. Then use back substitution to find $\hat{x}_{k-1}, \hat{x}_{k-2}, \ldots, \hat{x}_{1}$.

Then $LU\hat{x}=0$, so $\hat{x}$ is in the null space of $PA$.

Source Link
Brian Borchers
  • 19k
  • 1
  • 40
  • 70

If you compute the LU factorization of an $n$ by $n$ matrix $A$, then you'll end up with

$PA=LU$

where $P$ is a permutation matrix, $L$ is lower triangular and nonsingular, and $U$ is upper triangular. If $A$ happens to singular than the LAPACK routine will produce a $U$ matrix that is singular. The only way that an upper triangular matrix can be singular is to have a diagonal entry which is 0 (the determinant of $U$ is the product of its diagonal entries.) The info value returned by the LAPACK routine tells you the row/column of the first 0 on the diagonal of $U$.

You could use this information (for example) to find a nonzero vector $\hat{x}$ such that $U\hat{x}=0$. Suppose that info is $k$. Then let $\hat{x}_{j}=0$ for $j=n, n-1, \ldots, k+1$. Let $\hat{x}_{k}=1$. Then use back substitution to find $\hat{x}_{k-1}, \hat{x}_{k-2}, \ldots, \hat{x}_{1}$.

Then $LU\hat{x}=0$, so $\hat{x}$ is in the null space of $PA$.