First, load the "linalg" package in order to use the matrix commands
> with(linalg):
Warning, new definition for norm
Warning, new definition for trace
>