This Maple worksheet explores the linear algebra example

done in class today (September 23rd, 1998)

We first load the linear algebra package.

> with (linalg):

Now we define the matrix discussed in class.

> A := matrix (2,2,[n,n-1,n+1,n] );

[Maple Math]

Now compute the determinant.

> det(A);

[Maple Math]

As promised, the determinant is 1. However, if we do things differently,

perhaps different things will happen.

> subs( n=17, eval(A) );

[Maple Math]

> Ao := m -> subs( n=m, eval(A) );

[Maple Math]

> Ao(17);

[Maple Math]

> det( Ao(17) );

[Maple Math]

> Ao(10^8);

[Maple Math]

> det( Ao(10^8) );

[Maple Math]

That is what failed in Matlab. now we try floating point.

> Ao( 10.^8 );

[Maple Math]

> det( Ao( 10.^8 ) );

[Maple Math]

Whoops! The moral is that working with floating point is what causes the problem,

not the particular system doing the working with floating point. That is, it's not

Matlab's fault, or Maple's fault, it's just what happens when you use floating point arithmetic.

Maple may also have another problem, if the matrix has 300,000 digit entries.

> Big := Ao( 10^300000 ):

That shows that just creating the matrix doesn't cause a problem.

> det( Big );

Error, (in minor) object too large

Multiplying two 300,000 digit numbers results in a number too big for Maple

(on this 32-bit machine) to represent.

>