Sigh...I'm giving myself grade of 'D-' on the dotproduct function.
I suppose it did what I needed at the time; after that, I forgot about
it. As Robert suggested, making dotproduct into a simplifying function is
likely a good idea. There are some choices
dotproduct(a,0) --> 0 (OK)
dotproduct(a > b, 0) --> 0 (OK, but goofy)
dotproduct([1,2],0]) --> (OK, I suppose)
dotproduct(1 x n matrix, n x 1 matrix) --> conjugate(1 x n matrix) . (n x
1 matrix) (OK)
dotproduct(1 x n matrix, 1 x n matrix) --> dotproduct(1 x n matrix,
transpose(1 x n matrix)) --> ... (OK)
dotproduct(n x 1 matrix, n x 1 matrix) --> dotproduct(transpose(1 x n
matrix), 1 x n matrix) --> ... (OK)
dotproduct(1 x n matrix, n element list) --> (treat n element list as a
matrix row,
...
Barton