Determine the smallest eigenvalue of a matrix, as well as its condition number.
Input:
A square matrix
Output:
There are two methods. One returns the smallest eigenvalue of the matrix, the other one returns the condition number.
Usage/Example:
By finding the approximate condition number for various sizes of the matrix arising in the second order finite difference method approximation, we can see that the condition number grows larger with the size of the mesh. It also appears that the rate does not slow down either. This may indicate that this matrix is poorly conditioned as the size increases.
Output:
Implementation/Code:
Finding the smallest eigenvalue is the same as the iterative method described before to find the largest eigenvalue, only now we consider the action of the inverse of the matrix instead of the matrix itself. The result will be an eigenvector of the inverse, which is also an eigenvector of the matrix proper. We extract the eigenvalue the same way we did with forward iteration, and can now determine the condition number as
\[ K := \frac{\lambda_{\text{max}}}{\lambda_{\text{min}}} \].