Group Abstract Group Abstract

Message Boards Message Boards

[?] Solve and 3D plot an equation for two orthogonal vectors?

Posted 6 years ago

i want to calculate x so these two vectors (198, 565,231)(-421, 123, x) are orthogonal to each other and then plot it in 3D. i want this to work with any random numbers where one of them is unknown.

This is what ive come up with so far:

k = Solve[{198, 565, 231}.{-421, 123, x} == 0]

Graphics3D[{Arrow[{{0, 0, 0}, {198, 565, 231}}], Arrow[{{0, 0, 0}, {-421, 123, k}}]}]

this gives me a value on k but for some reason the ploting doesnt work. Can someone please help me?

POSTED BY: Adam F
Posted 6 years ago

Hi Adam,

k is the solution to the equation expressed as a rule. You need to apply the rule to get the value of the solution.

Graphics3D[{Arrow[{{0, 0, 0}, {198, 565, 231}}], Arrow[{{0, 0, 0}, {-421, 123, x /. First@k}}]}]

enter image description here

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard