ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 23 Nov 2019 18:44:38 +0100Absence of column vectorshttps://ask.sagemath.org/question/48860/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!
KraigSat, 23 Nov 2019 18:44:38 +0100https://ask.sagemath.org/question/48860/Solving linear matrix equationshttps://ask.sagemath.org/question/25059/solving-linear-matrix-equations/Hi everybody, I'm new to Sage and I'm pretty confused with the solving of matrix equations, I didn't fully understand the guide.
I've got these vectors:
V_fa = vector([V_f*cos(phi), V_f*sin(phi), 0])
V_ra = vector([V, 0, 0])
omega = vector([0, 0, L*psi_d])
P = vector([0, L*psi_d, 0])
And i want to implement the equation:
V_fa=V_ra+omega.cross_product(P)
to isolate and obtain the value of `psi_d`.
How can I do that?
Thank you very much
SilviaSun, 30 Nov 2014 19:35:22 +0100https://ask.sagemath.org/question/25059/