Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 9 years ago

done_with_fish gravatar image

Can sage extend bases?

Say I have subspaces XY of a vector space V. I want to extend a basis for X to a basis for Y. Does sage have this capability?

click to hide/show revision 2
No.2 Revision

Can sage extend bases?

Say I have subspaces XY of a vector space V. I want to extend a basis for X to a basis for Y. Does sage have this capability?

For example, I have two matrices

sage: d1 = matrix(GF(2), [
....: [1,0,1,0,1,0,1,0,1,0],
....: [1,1,0,0,0,0,0,0,0,1],
....: [0,1,1,1,0,0,0,0,0,0],
....: [0,0,0,1,1,1,0,0,0,0],
....: [0,0,0,0,0,1,1,1,0,0],
....: [0,0,0,0,0,0,0,1,1,1]])
sage: d2 =  matrix(GF(2), [
....: [1,1,1,0,0,0,0,0,0,0],[0,0,1,1,1,0,0,0,0,0]]).transpose()

Since d1*d2=0 we know that the column space of d2 is a subspace of the null space of d1. We can obtain a basis for the column space of d2 with

sage: d2.column_space().basis()

How could we extend this basis to a basis of the null space of d1?

click to hide/show revision 3
No.3 Revision

Can sage extend bases?

Say I have subspaces XY of a vector space V. I want to extend a basis for X to a basis for Y. Does sage have this capability?

For example, I have two matrices

sage: d1 = matrix(GF(2), [
....: [1,0,1,0,1,0,1,0,1,0],
....: [1,1,0,0,0,0,0,0,0,1],
....: [0,1,1,1,0,0,0,0,0,0],
....: [0,0,0,1,1,1,0,0,0,0],
....: [0,0,0,0,0,1,1,1,0,0],
....: [0,0,0,0,0,0,0,1,1,1]])
[0,0,0,0,0,0,0,1,1,1]
....: ])
sage: d2 =  matrix(GF(2), [
....: [1,1,1,0,0,0,0,0,0,0],[0,0,1,1,1,0,0,0,0,0]]).transpose()
[[1,1,1,0,0,0,0,0,0,0],[0,0,1,1,1,0,0,0,0,0]]).transpose()

Since d1*d2=0 we know that the column space of d2 is a subspace of the null space of d1. We can obtain a basis for the column space of d2 with

sage: d2.column_space().basis()

How could we extend this basis to a basis of the null space of d1?