1 | initial version |
Looks like you are trying to solve the matrix equation x Matrix = v1
for x
. Use Matrix.solve_left(v1)
.
sage: m = random_matrix(QQ, 2, 4)
sage: m
[ 0 1 0 -1/2]
[ -1 0 0 0]
sage: v = 2*m[0] + m[1]
sage: v
(-1, 2, 0, -1)
sage: m.solve_left(v)
(2, 1)
2 | No.2 Revision |
Looks like you are trying to solve the matrix equation x Matrix = v1
for x
. Use Matrix.solve_left(v1)
.
sage: m = random_matrix(QQ, 2, 4)
sage: m
[ 0 1 0 -1/2]
[ -1 0 0 0]
sage: v = 2*m[0] + m[1]
sage: v
(-1, 2, 0, -1)
sage: m.solve_left(v)
(2, 1)
Of course this need not have any solutions, and if it does have a solution, it may not be unique.