[Haskell-cafe] matrix computations based on the GSL

Henning Thielemann lemming at henning-thielemann.de
Wed Jun 29 12:45:15 EDT 2005


On Wed, 29 Jun 2005, Jacques Carette wrote:

> 9. There are row vectors and column vectors, and these are different
> types.  You get type errors if you mix them incorrectly.

What do you mean with "row vectors and column vectors are different
types"? Do you mean that in a well designed library they should be
distinguished? I disagree to this point of view which is also represented
by MatLab. Distinction of row and column vectors is a misconcept and it
seems to have its roots in mixing up vectors with matrices. In linear
functional analysis you have functions (as vectors), operators (as
matrices) and scalar products. You would never try to transpose a
function. A vector of R^n can be considered as function from {1,...,n} ->
R. So what is the operation of transposition? A type conversion?
 If we instead distinguish row and column vectors because we treat them as
matrices, then the quadratic form
  x^T * A * x
 denotes a 1x1 matrix, not a real. The MatLab hack for this inconvenience
is to consider 1x1 matrix as real. But there is no need to do so since
  <x, A*x>
 evaluates a real and works also for continuous functions x.



More information about the Haskell-Cafe mailing list