Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For my system of equations, the procedure described in Solving complex equations of using Reduce works no more. How can I separate the real and imaginary part of the equations? Because then I could use Solve[equations, vars, Reals]. Nevertheless I hope for a simpler way to overcome this issue.


Vector = {v1, v2, v3, v4};
Matrix = {{c11, c12, c13, c14}, 
          {c21, c22, c23, c24}, 
          {c31, c32, c33, c34}, 
          {c41, c42, c43, c44}};
Reduce[Table[0 == Sum[Matrix[[r, k]] Vector[[k]], {k, 4}], {r, 4}] && 
 Element[{v1Real, v1Complex, v2Real, v2Complex, v3Real, v3Complex, v4Real, v4Complex}, Reals],
 {v1Real, v1Complex, v2Real, v2Complex, v3Real, v3Complex, v4Real, v4Complex}] /. 
 {v1 -> v1Real + I v1Complex, v2 -> v2Real + I v2Complex, v3 -> v3Real + I v3Complex, v4 -> v4Real + I v4Complex}
share|improve this question
We could likely provide something more useful to you if on;y you'd explicitly mention what your "system of equations" are. – J. M. May 2 '13 at 12:05
The way you defined the equations you can only expect trivial solutions. Try to check eq = (# == 0) & /@ (matrix . vector);Solve[eq, vector, Complexes]. Also be careful with the fact that initiating symbols with capital letters are avoided in Mathematica. – PlatoManiac May 2 '13 at 12:41
I want to introduce some symmetry properties into the vector as in my case the vector represents the density matrix, i.e. Complexes is no intuitive option! – strpeter May 2 '13 at 14:10
It's a linear system. You can use LinearSolve. Then, if you must, separate the symbolic solution into real and imaginary parts using Re and Im. – Daniel Lichtblau May 2 '13 at 14:44

1 Answer 1

up vote 2 down vote accepted

Daniel Lichtblau mentions in a comment:

It's a linear system. You can use LinearSolve. Then, if you must, separate the symbolic solution into real and imaginary parts using Re and Im.

share|improve this answer
If you want to get credit for this answer, could you please write out the corresponding code? ;) Thank you! – strpeter Sep 27 at 16:24
I am not looking for credit; I only posted this to get the question off the unanswered list, and the answer is already marked as "community wiki", which means no points accrue to the poster. Is it really helpful for you if I add "Through@{Re, Im}@LinearSolve[Matrix, Vector]" to the above or was the comment clear enough already? I think probably the latter. – Oleksandr R. Sep 27 at 16:36
I agree with you since I did not want to bother you. – strpeter Sep 27 at 16:56
@strpeter if this answer doesn't meet your needs then please clarify the question and perhaps you can get a better one. There is nothing wrong with saying that an answer doesn't help, if that's the case--it just seemed to me that Daniel's comment was all that was needed to address it, but maybe I misunderstood. – Oleksandr R. Sep 27 at 17:01
@strpeter good--glad to hear that it is a useful answer. To write it out without using @, we have Through[{Re, Im}[LinearSolve[Matrix, Vector]]]. The @ is right-associative and simply takes the place of the function application brackets. I usually write Through this way as I find it easier to read than the infix form. – Oleksandr R. Sep 27 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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