innerProduct with SparseColumnMatrix a was multiplying with itself (this) rather than with a.