Ask Your Question

# Revision history [back]

### Absence of column vectors

I'm curious as to why column vecotrs seem to be non-existent in sage. To give you some context, I work with the following system:

R3 = IntegerModRing(3)
c_7_4 = [
[1, 0, -2, 0, 0, 0, 1],
[1, 1, 0, 0, -2, 0, 0],
[0, 1, 1, 0, 0, -2, 0],
[0, 0, 1, 1, 0, 0, -2],
[0, -2, 0, 1, 1, 0, 0],
[-2, 0, 0, 0, 1, 1, 0],
[0, 0, 0, -2, 0, 1, 1]
]
C3 = Matrix(R3, c_7_4)
B3 = C3.right_kernel().basis()


Clearly, the right kernel of C3 is a column vector, but if you run this code, you would find that

print(B3[0]) # returns a row vector
print(B3[0] * C3) # returns an answer
print(C3 * B3[0]) # returns an answer


Given that a column matrix should reasonably be written

[[a],[b]]


Why is this not the case? Specifically, is there a coding limitation to what the programmers can do which forces them to implement it in this way, or is there some mathematical usefulness to this which is beyond my understanding?

Thanks!