Ask Your Question
1

Canonical way of turning implicit equations into a subspace and vice versa

asked 2016-10-23 16:23:17 +0100

Jsevillamol gravatar image

updated 2016-10-23 16:35:49 +0100

Many times I want to go back and forth between the parametric equations of a subspace and its representation as an implicit equation.

For example, I may have a hyperplane in QQ^3 defined by the equation $ax+by+cz=0$, and I may want to turn it into a subspace object in sage. Or I may start with a subspace generated by span([v2,v3]) and I may want to compute its associated subspace in the dual and thus its implicit equations. What is the canonical way of doing so in Sage?

I thought that the method annihilator was what I was looking for, but so far I have not managed to make it work. Any other suggestions?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-23 20:58:14 +0100

tmonteil gravatar image

I am not sure how "canonical" it is, but i would do the following:

For your first question, satisfying an equatiion corresponds to gelonging to some kernel:

sage: M = matrix(QQ,[[1,2,3,]])
sage: M.right_kernel()
Vector space of degree 3 and dimension 2 over Rational Field
Basis matrix:
[   1    0 -1/3]
[   0    1 -2/3]

sage: M.right_kernel().basis()
[
(1, 0, -1/3),
(0, 1, -2/3)
]

So, the set of vectors that satifsfy ax+by+cz=0 are the t_1 * (1, 0, -1/3) + t_2 * (0, 1, -2/3) for t_1 and t_2 in QQ.

For your second question, you can do:

sage: v1 = vector(QQ,(1,2,3))
sage: v2 = vector(QQ,(4,5,6))

sage: V = span([v1,v2],QQ) ; V
Vector space of degree 3 and dimension 2 over Rational Field
Basis matrix:
[ 1  0 -1]
[ 0  1  2]

sage: vector((5,7,9),QQ) in  V
True
edit flag offensive delete link more

Comments

Right kernel was exactly what I was looking for! However, I think I have been confusing in my second question. Now I want to go back to the implicit equations. What I have thought of now that I know that right_kernel is a thing is using A.basis_matrix().right_kernel(), where A is a vectorial space. I am wondering though if there is a shorthand version of this. Any idea?

Jsevillamol gravatar imageJsevillamol ( 2016-10-24 18:33:17 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-23 16:23:17 +0100

Seen: 718 times

Last updated: Oct 23 '16