# Basis for such a quotient vector space

Hi all,

Here is my code:

A = matrix(QQ, 4, 3, [1, 2, 3, 5, 10, 15, 0, 0, 0, -2, -4, -6])

B = matrix(QQ, 5, 4, [0, 2, 7, 5, 0, 0, 0, 0, 0, -2, -7, -5, 0, 4, 14, 10, 0, 6, 21, 15])

W = A.transpose().image()

V = B.right_kernel()

V/W

This way W is the range of the linear map $$A:\mathbb{Q}^3\longrightarrow\mathbb{Q}^4,$$ V is the nullspace of $$B:\mathbb{Q}^4\longrightarrow\mathbb{Q}^5,$$ Since BA=0, W is a subspace of V. and the command V/W returns in particular the dimension of the quotient vector space V/W which is equal to 2.

What I want is a basis of V/W, i.e. 2 vectors of $\mathbb{Q}^4$ which are in V, in the form of a 2x4 matrix the same way V.basis_matrix() returns a basis for V.

How can I do this?

Thanks!

edit retag close merge delete

Sort by » oldest newest most voted

Let me first give a name to the quotient $V/W$:

sage: Q = V/W


Now, searching within the avaiable methods, the first thing to try is:

sage: Q.basis()
[
(1, 0),
(0, 1)
]


but as you can see, it returns a basis within itself, not within $V$. So what you have to do is to lift each element of that basis into $V$:

sage: [Q.lift(b) for b in Q.basis()]
[(1, 0, 0, 0), (0, 0, 1, -7/5)]


If you prefer, you can make this basis a matrix as follows:

sage: matrix([Q.lift(b) for b in Q.basis()])
[   1    0    0    0]
[   0    0    1 -7/5]

more