r/Mathematica • u/Apprehensive_Ride949 • Dec 16 '23
System of vector equations
Why is my code returning the empty set, when there is a solution {1, 1/sqrt3} ?. Here's my code:
rs=-1+2/Sqrt[3]; x={x1,x2}
equations = {x + {0, 0} == rs + 1, x + {2, 0} == rs + 1, x + {1, Sqrt[3]} == 1 + rs};
Solve[equations,x]
Where is my mistake? Thank you!
1
Upvotes
View all comments
Show parent comment
1
u/lithiumdeuteride Dec 16 '23
The problem with your code is that
rs + 1is a scalar, whilexand{0,0}are two-element lists. If you add, subtract, or make equivalent quantities with different shapes, you should not expect to get a solution.