1
$\begingroup$

I am having trouble using Solve function with equations evolving vector cross product. For example if I perform cross product of two vectors:

x = {1, 0, 0};
y = {0, 1, 0};
z=Cross[x, y]

gives {0,0,1} as expected.

However, if I know x and z, but try to find y for example using Solve:

x = {1, 0, 0};
z = {0, 0, 1};
Solve[z == Cross[x, y], y]

I get no answer {}

Is there a way to do this in Mathematica?

Thanks for your help!

$\endgroup$

3 Answers 3

5
$\begingroup$

I think you could do something like this:

Solve[z == Cross[x, y], y \[Element] FullRegion[3]]
$\endgroup$
2
  • $\begingroup$ Thanks for the idea, but unfortunately this doesn't seem to work either. $\endgroup$
    – user90441
    Feb 22, 2023 at 22:20
  • $\begingroup$ Well, I don't know what you mean by "doesn't work". It produces a solution for me. If it's the form that you don't like, then @cvgmt provided a similar solution with a slightly different semantic. $\endgroup$
    – lericr
    Feb 22, 2023 at 22:23
5
$\begingroup$
x = {1, 0, 0};
z = {0, 0, 1};
Reduce[z == Cross[x, y], y ∈ Vectors[3]]

enter image description here

Clear[x, y, z, y1, y2, y3, sol];
x = {1, 0, 0};
z = {0, 0, 1};
y = {y1, y2, y3};
sol = ToRules[Reduce[{z == Cross[x, y]}]]
y /. sol
z == Cross[x, y] /. sol

> True.

All of {y1, 1, 0} satifies z==Cross[x,y} when y=={y1, 1, 0}.

$\endgroup$
2
  • $\begingroup$ Thanks for the idea. I am not sure about this. The answer should be y = {0, 1, 0} $\endgroup$
    – user90441
    Feb 22, 2023 at 22:22
  • 2
    $\begingroup$ Well, no, @user90441. {0,1,0} is only one specific solution. There is an infinite number of solutions. $\endgroup$
    – lericr
    Feb 22, 2023 at 22:23
0
$\begingroup$

One way to look at this is to convert the equations a cross b == c to the matrix form A.b == c and show that the matrix A is not invertible:

(* cross product of vectors a and b *)
aCrossb = Cross[{ax, ay, az}, {bx, by, bz}]

(*{-az by+ay bz,az bx-ax bz,-ay bx+ax by}*)

(* construct equations *)
eqs = Thread[aCrossb == {cx, cy, cz}]

(*{-az by+ay bz\[Equal]cx,az bx-ax bz\[Equal]cy,-ay bx+ax \
by\[Equal]cz}*)

(* matrix form of equations *)
{c, A} = Normal@CoefficientArrays[eqs, {bx, by, bz}]

(*{{-cx,-cy,-cz},{{0,-az,ay},{az,0,-ax},{-ay,ax,0}}}*)

(*A.b reconstructs cross product*)
(*so A.b==c is the system to be solved for b*)
A . {bx, by, bz}

(*{-az by+ay bz,az bx-ax bz,-ay bx+ax by}*)

(*we need to invert A*)

(*but the determinant of of A is zero*)
Det[A]

(*0*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.