#17567: Cross product matrix (hat operator)
------------------------------+----------------------------
Reporter: gagern | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.5
Component: linear algebra | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------------+----------------------------
For some operations it's useful to write a cross product between two
vectors as a matrix times vector (or vector times matrix) linear
transformation. Of course, this is most useful in those situations where
the cross product isn't multiplied straight away, but the matrix is used
on its own.
One application that I know of is when intersecting a conic with a line
using projective geometry. There, conjugating the matrix of the conic with
the cross product matrix of the line results in a degenerate conic which
factors into the points of intersection. But I've heard that there are
applications in 3D computer graphics as well, where this is known as the
[http://en.wikipedia.org/wiki/Hat_operator#Cross_product hat operator].
The simplest implementation would be something like this:
{{{
def cross_product_matrix(v):
return matrix([e.cross_product(v) for e in v.parent().basis()])
}}}
It satisfies these conditions:
{{{
cross_product_matrix(v)*w == v.cross_product(w)
w*cross_product_matrix(v) == w.cross_product(v)
}}}
But I guess it would be better to implement this as a method of
`FreeModuleElement`. I'm not sure whether it would be better to access the
basis as I did above, or whether it would be preferable to hard-code the
matrix layout, both for the sake of performance and because it ensures we
don't depend on the basis.
--
Ticket URL: <http://trac.sagemath.org/ticket/17567>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.