Preface

When numerically evaluating more complex expressions some care is needed, as with all numerical computations, because severe cancelation can result in the numerial accuracy of a computation sometimes being unrelated to the mi,ber of desomal places, except that increasing their number normally improves numerical accuracy.

We calculate the difference of two identical numbers \( \cos \left( 2\,1o^i * \pi + y\right) - \cos (y) \) for y = 2.27. For this particular case, we use 4 decimal places and then repeat calculations with 8 decimal places.

Digits:=4
y:=2.27
printf("%2s %9s %22s \n%35s", "i", "x", "difference", "sin(x)-sin(y)")
for i to 7 do 
x := evalf(2*10^i*Pi+y); 
printf("%2.0f  %9.2f %12.10f\n", i, x, evalf(cos(x)-cos(y))) 
end do
i x difference
sin(x) - sin(y)
1 65.11 -0.00620
2 620.70 -0.08120
3 6286.00 -0.40340
4 62840.00 0.35480
5 628400.00 1.62100
6 6284000.00 0.12050
7 62840000.00 -0.06840
and with 8 decimal places
i x difference
sin(x) - sin(y)
1 65.10 -0.00000071
2 630.59 -0.0000071
3 6285.46 -0.00007104
4 62834.12 -0.000071013
5 628320.81 -0.00707623
6 6283187.70 -0.08891679
7 62831856.00 -0.3371051
(a*b)/c+13*d \[ {\frac {ab}{c}}+13\,d \]
Two n-by-n matrices A and B are called similar if there exists an invertible n-by-n matrix S such that
Theorem: If λ is an eigenvalue of a square matrix A, then its algebraic multiplicity is at least as large as its geometric multiplicity.    ▣
Let x1, x2, … , xr be all of the linearly independent eigenvectors associated to λ, so that λ has geometric multiplicity r. Let xr+1, xr+2, … , xn complete this list to a basis for ℜn, and let S be the n×n matrix whose columns are all these vectors xs, s = 1, 2, … , n. As usual, consider the product of two matrices AS. Because the first r columns of S are eigenvectors, we have
\[ {\bf A\,S} = \begin{bmatrix} \vdots & \vdots&& \vdots & \vdots&& \vdots \\ \lambda{\bf x}_1 & \lambda{\bf x}_2 & \cdots & \lambda{\bf x}_r & ?& \cdots & ? \\ \vdots & \vdots&& \vdots & \vdots&& \vdots \end{bmatrix} . \]
Now multiply out S-1AS. Matrix S is invertible because its columns are a basis for ℜn. We get that the first r columns of S-1AS are diagonal with &lambda's on the diagonal, but that the rest of the columns are indeterminable. Now S-1AS has the same characteristic polynomial as A. Indeed,
\[ \det \left( {\bf S}^{-1} {\bf AS} - \lambda\,{\bf I} \right) = \det \left( {\bf S}^{-1} {\bf AS} - {\bf S}^{-1} \lambda\,{\bf I}{\bf S} \right) = \det \left( {\bf S}^{-1} \left( {\bf A} - \lambda\,{\bf I} \right) {\bf S} \right) = \det \left( {\bf S}^{-1} \right) \det \left( {\bf A} - \lambda\,{\bf I} \right) \det \det \left( {\bf S} \right) = \det \left( {\bf A} - \lambda\,{\bf I} \right) \]
because the determinants of S and S-1 cancel. So the characteristic polynomials of A and S-1AS are the same. But since the first few columns of S-1AS has a factor of at least (x - λ)r, so the algebraic multiplicity is at least as large as the geometric.    ◂