On 9/12/12 12:04 PM, Jason Grout wrote:
I'm curious: is there a good reason why the product of two complex
vectors does not conjugate the first vector (which would yield the
standard inner product for complex vectors).
Note:
sage: v=vector(CDF,[2+I,5])
sage: v
(2.0 + 1.0*I, 5.0)
sage: v*v
28.0 + 4.0*I
sage: v.column().H*v.column()
[30.0]
I'd like the third computation to be 30.0.
On a related note, when teaching about projections and finding
coordinates, this sort of computation is natural:
q=(vector(QQ,[2,-2,1])/3).column()
v=vector([5,4,3]).column()
(q.H*v)*q # projection of v onto q
However, this gives an error now, since q.H*v is a 1x1 matrix and q is a
3x1 matrix. What do people say to making an allowance for 1x1 matrices
to be treated as scalars when multiplied by other matrices (as they are
in matlab, for example), so that the above computation gives the
projection? There are probably ramifications from this allowance for
mathematical sloppiness that I'm not thinking of right now...
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.