Suggestion for displaying solutions as a column vector
Publié : lun. nov. 17, 2025 2:52 pm
Hi, when solving a system, if the variables are specified as a column vector (n*1 matrix), display the output in the same way to avoid having to perform a transposition.
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[α1,α2,α3],
'=')
=>
set[[α1 = -α3, α2 = α3, α3 = α3]]
transpose(
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[α1,α2,α3],
'='))
=>
[[α1 = -α3],
[α2 = α3],
[α3 = α3]]
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[[α1],
[α2],
[α3]]
'=')
=>
[[α1 = -α3],
[α2 = α3],
[α3 = α3]]
Another option would be to display the answer as a vector expression if it finds a parameter.
[[α1],
[α2],
[α3]]
=
α3* ([[-1],
[1],
[1]])
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[α1,α2,α3],
'=')
=>
set[[α1 = -α3, α2 = α3, α3 = α3]]
transpose(
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[α1,α2,α3],
'='))
=>
[[α1 = -α3],
[α2 = α3],
[α3 = α3]]
solve(
[[(3*α1+α2+2*α3) = 0],
[(-α1-α2) = 0],[(-5*α1-3*α2-2*α3) = 0],
[(9*α1+3*α2+6*α3) = 0]],
[[α1],
[α2],
[α3]]
'=')
=>
[[α1 = -α3],
[α2 = α3],
[α3 = α3]]
Another option would be to display the answer as a vector expression if it finds a parameter.
[[α1],
[α2],
[α3]]
=
α3* ([[-1],
[1],
[1]])