The Identity for Matrix Multiplication
The Identity for matrix multiplication is a matrix of zeros, with ones on the diagonal. In order to make a functional operator which does this, we need an "if" statement. The syntax is as follows.
> f:=(m,n)->if (m=n) then 1 else 0 fi;
Note that the "if" statement must end with a "fi", which is a backwards "if".
Now let's use this to make a 10 by 10 identity matrix and call it "I10":
> I10:=matrix(10,10,f);
Let's also make a 10 by 10 matrix containing random integers from 1 to 10. This can be done with Maple's "rand" function as follows:
> g:=rand(1..10);
> G:=matrix(10,10,g);
Let's check the multiplicative identity from the left:
> evalm(G&*I10);
Let's also check the multiplicative identity from the right:
> evalm(I10&*G);
>