Here is an example of calculating the condition number of a matrix:
Matrix:
A = [[1 2]
[2 4]]
Finding the 2nd-norm of a matrix:
||A||_2 = sqrt(max(sum(abs(row)^2 for row for A))) = sqrt(max(5, 20)) = sqrt(20) = 2√5
Finding the 2nd-norm of the inverse of a matrix:
A^-1 = [[0.25 -0.125]
[-0.125 0.25]]
||A^-1||_2 = sqrt(max(sum(abs(row)^2 for row in A^-1))) = sqrt(max(0.0625, 0.0625)) = 0.25
Calculation of bet number:
κ(A) = ||A||_2 * ||A^-1||_2 = 2√5 * 0.25 = √5
Explanation:
The condition number of matrix A is √5. This value indicates that the matrix is moderately well conditioned. A small change in the input data will result in a small change in the solution, but not as small as a well-conditioned matrix with a condition number close to 1.
Comments
Post a Comment