# How to solve system of equations with complex variables

I'm trying to obtain the solution to the following system of 3 equations and 4 variables:

Solve[{y Conjugate[x] + z Conjugate[w] + x Conjugate[y] + w Conjugate[z] == 0,
x Conjugate[x] + w Conjugate[w] - y Conjugate[y] - z Conjugate[z] == 0,
y Conjugate[x] + z Conjugate[w] - x Conjugate[y] - w Conjugate[z] == 0},
{x, y, z, w}]


However, both Solve and NSolve seem to not be able to do it on my computer after half and hour of computation. Why is this not working? Is there a way to do this type of computations faster? Or even do it at all. Below I show one possible solution to the system of equations to prove that it should in principle be found:

{y Conjugate[x] + z Conjugate[w] + x Conjugate[y] + w Conjugate[z] == 0,
x Conjugate[x] + w Conjugate[w] - y Conjugate[y] - z Conjugate[z] == 0,
y Conjugate[x] + z Conjugate[w] - x Conjugate[y] - w Conjugate[z] == 0} /. {x -> 1, y -> 0, z -> 1, w -> 0}

{True, True, True}

• To me, this seems like a complicated non-linear system of equations (but I don't really recognize what type of a system this is and what the solution set should look like). You can try with FindInstance to get some possible solutions, for example: FindInstance[{ (* insert all three equations *) }, {x, y, z, w}, Integers, 10]. Nov 2 '21 at 20:07
• You have three equations and eight variables. Nov 2 '21 at 20:34
• @MichaelSeifert According to ComplexExpand, the imaginary parts of the first two eqs cancel, while the real parts of the last eq cancels. So, It seems there are really only three eqs. Nov 2 '21 at 21:08
• @JohnDoty: Yeah, I realized that after the fact, hence the deleted comment. :-) Nov 4 '21 at 17:46

## 2 Answers

You can always explicitly set $$x = x_r + i x_i$$, and similarly for the other variables, and then apply Solve over the Reals. As noted in John Doty in the comments, the resulting solution space is multi-dimensional; it appears to be five-dimensional at generic points.

eqns = {y Conjugate[x] + z Conjugate[w] + x Conjugate[y] + w Conjugate[z] == 0,
x Conjugate[x] + w Conjugate[w] - y Conjugate[y] - z Conjugate[z] == 0,
I (y Conjugate[x] + z Conjugate[w] - x Conjugate[y] -
w Conjugate[z]) == 0}
rules = {x -> xr + I xi, y -> yr + I yi, z -> zr + I zi, w -> wr + I wi}
Solve[ComplexExpand[eqns /. rules], {xr, xi, yr, yi, zr, zi, wr, wi}, Reals]

(* returns a set of 13 possible rules for xr, xi, & yr in terms of
ConditionalExpressions on the remaining variables *)


You system is underdetermined. You can solve for any three of the eight components of your four complex numbers in terms of the other components:

eqs = ComplexExpand[{y Conjugate[x] + z Conjugate[w] +
x Conjugate[y] + w Conjugate[z] == 0,
x Conjugate[x] + w Conjugate[w] - y Conjugate[y] - z Conjugate[z] ==
0, y Conjugate[x] + z Conjugate[w] - x Conjugate[y] -
w Conjugate[z] == 0}, {w, x, y, z}, TargetFunctions -> {Re, Im}]


Choosing to solve for the real components of x,y,and z:

Solve[eqs, {Re[x], Re[y], Re[z]}]


Yields a very long result, four complicated solutions.