2 Condition numbers

The condition number of an invertible matrix A is defined to be

κ ( A ) = A A 1 .

This quantity is always bigger than (or equal to) 1.

We must use the same type of norm twice on the right-hand side of the above equation. Sometimes the notation is adjusted to make it clear which norm is being used, for example if we use the infinity norm we might write

κ ( A ) = A A 1 .

Example 15

Use the norm indicated to calculate the condition number of the given matrices.

  1. A = 2 3 1 1 ; 1-norm.
  2. A = 2 3 1 1 ; Euclidean norm.
  3. B = 3 0 0 0 4 0 0 0 2 ; infinity-norm.
Solution
  1. A 1 = max ( 2 + 1 , 3 + 1 ) = 4 , A 1 = 1 2 3 1 3 1 2 = 1 5 3 5 1 5 2 5 A 1 1 = max ( 1 5 + 1 5 , 3 5 + 2 5 ) = 1.

    Therefore κ 1 ( A ) = A 1 A 1 1 = 4 × 1 = 4.

  2. A E = 2 2 + 3 2 + 1 2 + ( 1 ) 2 = 15 . We can re-use A 1 from above to see that

    A 1 E = 1 5 2 + 3 5 2 + 1 5 2 + 2 5 2 = 15 25 .

    Therefore κ E ( A ) = A E A 1 E = 15 × 15 25 = 15 25 = 15 5 = 3.

  3. B = max ( 3 , 4 , 2 ) = 4.

    B 1 = 1 3 0 0 0 1 4 0 0 0 1 2

    so B 1 = max ( 1 3 , 1 4 , 1 2 ) = 1 2 . Therefore κ ( B ) = B B 1 = 4 × 1 2   = 2.

Task!

Calculate the condition numbers of these matrices, using the norm indicated

A = 2 8 3 1 (1-norm) , B = 3 6 1 0 (infinity-norm) .

A 1 = 1 2 + 24 1 8 3 2 so   κ 1 ( A ) = A 1 A 1 1 = max ( 5 , 9 ) × max ( 4 26 , 10 26 ) = 9 × 10 26 = 45 13 .

B 1 = 1 0 6 0 6 1 3 so   κ ( B ) = B B 1 = max ( 9 , 1 ) × max ( 1 , 4 6 ) = 9.

2.1 Condition numbers and conditioning

As the name might suggest, the condition number gives us information regarding how well-conditioned a problem is. Consider this example

1 1 0 4 1 2 x 1 x 2 = 1 0 4 1 .

It is not hard to verify that the exact solution to this problem is

x 1 x 2 = 10000 10002 10001 10002 = 0 . 999800 . . . 0 . 999900 . . . .

Example 16

Using the 1-norm find the condition number of 1 1 0 4 1 2 .

Solution

Firstly, A 1 = 2 + 1 0 4 . Also

A 1 = 1 2 + 1 0 4 2 1 0 4 1 1 A 1 1 = 1 2 + 1 0 4 ( 1 + 1 0 4 ) . Hence κ 1 ( A ) = 1 + 1 0 4 = 10001.

The fact that this number is large is the indication that the problem involving A is an ill-conditioned one. Suppose we consider finding its solution by Gaussian elimination, using 3 significant figures throughout. Eliminating the non-zero in the bottom left corner gives

1 1 0 4 0 1 0 4 x 1 x 2 = 1 0 4 1 0 4 .

which implies that x 2 = 1 and x 1 = 0 . This is a poor approximation to the true solution and partial pivoting will not help. We have altered the problem by a relatively tiny amount (that is, by neglecting the fourth significant figure) and the result x 1 x 2 has changed by a large amount. In other words the problem is ill-conditioned.

One way that systems of equations can be made better conditioned is to fix things so that all the rows have largest elements that are about the same size. In the matrix A = 1 1 0 4 1 2 the first row’s largest element is 1 0 4 , the second row has largest element equal to 2. This is not a happy situation.

If we divide the first equation through by 1 0 4 then we have

1 0 4 1 1 2 x 1 x 2 = 1 1

then the top row has largest entry equal to 1, and the bottom row still has 2 as its largest entry. These two values are of comparable size.

The solution to the system was found via pivoting (using 3 significant figures) in the Section concerning Gaussian elimination to be x 1 = x 2 = 1 , a pretty good approximation to the exact values.

The matrix in this second version of the problem is much better conditioned.

Example 17

Using the 1-norm find the condition number of 1 0 4 1 1 2 .

Solution

The 1-norm of A is easily seen to be A 1 = 3 . We also need

A 1 = 1 2 × 1 0 4 + 1 2 1 1 1 0 4 A 1 1 = 3 2 × 1 0 4 + 1 .

Hence

κ 1 ( A ) = 9 2 × 1 0 4 + 1 8.998

This condition number is much smaller than the earlier value of 10001, and this shows us that the second version of the system of equations is better conditioned.

Exercises
  1. Calculate the indicated norm of the following matrices
    1. A = 2 2 1 3 ; 1-norm.
    2. A = 2 2 1 3 ; infinity-norm.
    3. B = 2 3 1 2 ; Euclidean norm.
    4. C = 1 2 3 1 5 6 2 1 3 ; infinity-norm.
    5. C = 1 2 3 1 5 6 2 1 3 ; 1-norm.
  2. Use the norm indicated to calculate the condition number of the given matrices.
    1. D = 4 2 6 0 ; 1-norm.
    2. E = 1 5 4 2 ; Euclidean norm.
    3. F = 6 0 0 0 4 0 0 0 1 ; infinity-norm.
  3. Why is it not sensible to ask what the condition number of 1 3 2 6 is?
  4. Verify that the inverse of G = 2 4 1 2 5 2 1 1 1 is 1 5 7 3 13 4 1 6 3 2 2 .

    Hence find the condition number of G using the 1-norm.

    1. Calculate the condition number (use any norm you choose) of the coefficient matrix of the system

      1 1 0 4 2 3 x 1 x 2 = 1 3

      and hence conclude that the problem as stated is ill-conditioned.

    2. Multiply one of the equations through by a suitably chosen constant so as to make the system better conditioned. Calculate the condition number of the coefficient matrix in your new system of equations.
    1. A 1 = max ( 2 + 1 , 2 + 3 ) = 5 .
    2. A = max ( 2 + 2 , 1 + 3 ) = 4 .
    3. B E = 4 + 9 + 1 + 4 = 18
    4. C = max ( 1 + 2 + 3 , 1 + 5 + 6 , 2 + 1 + 3 ) = 12 .
    5. C 1 = max ( 1 + 1 + 2 , 2 + 5 + 1 , 3 + 6 + 3 ) = 12 .
    1. To work out the condition number we need to find

      D 1 = 1 12 0 2 6 4 .

      Given this we work out the condition number as the product of two norms as follows

      κ 1 ( D ) = D 1 D 1 1 = 10 × 1 2 = 5.

    2. To work out the condition number we need to find

      E 1 = 1 22 2 5 4 1 .

      Given this we work out the condition number as the product of two norms as follows

      κ E ( E ) = E E E 1 E = 6.782330 × 0.308288 = 2 . 090909 .

      to 6 decimal places.

    3. Here F 1 = 1 6 0 0 0 1 4 0 0 0 1 so that κ ( F ) = F F 1 = 6 × 1 = 6.
  1. The matrix is not invertible.
  2. Verification is done by a direct multiplication to show that G G 1 = 1 0 0 0 1 0 0 0 1 .

      Using the 1-norm we find that κ 1 ( G ) = G 1 G 1 1 = 10 × 21 5 = 42.

    1. The inverse of the coefficient matrix is

      1 3 2 × 1 0 4 3 1 0 4 2 1 = 1 19997 3 10000 2 1 .

      Using the 1-norm the condition number of the coefficient matrix is

      ( 3 + 1 0 4 ) × 1 19997 ( 1 + 1 0 4 ) = 5002.75

      to 6 significant figures. This is a large condition number, and the given problem is not well-conditioned.

    2. Now we multiply the top equation through by 1 0 4 so that the system of equations becomes

      1 0 4 1 2 3 x 1 x 2 = 1 3

      and the inverse of this new coefficient matrix is

      1 3 × 1 0 4 2 3 1 2 1 0 4 = 1 1.9997 3 1 2 .0001 .

      Using the 1-norm again we find that the condition number of the new coefficient matrix is

      4 × 1 1.9997 ( 5 ) = 10.0015

      to 6 significant figures. This much smaller condition number implies that the second problem is better conditioned.