Mathematica returns no solutions for this simple query:

Solve[a*x == x && x != 0, {x}]
(* output: {} *)

Clearly, when a is 1, any x is a solution. Therefore, I would expect the solution to involve a case distinction over a.

What is Mathematica solving here exactly? I was thinking it would try to find x that satisfies the equation for all a, but then this should not return any solution either (but it does):

Solve[x == a, {x}]
(* output: {{x -> a}} *)
  • $\begingroup$ You can try using Reduce instead of Solve. $\endgroup$
    – Carl Woll
    Sep 8, 2020 at 18:20
  • $\begingroup$ @CarlWoll Using Reduce makes sense for me, thanks for the hint! Still, I would like to understand what Solve does in this case. If I cannot interpret the output of Solve correctly ({} in this case), I will not be able to use it in more complex cases where I cannot verify the result. $\endgroup$
    – Peter
    Sep 8, 2020 at 18:29
  • 1
    $\begingroup$ This issue had been discussed several times. For an extended discussion see What is the difference between Reduce and Solve?. Solve without any options cannot yield a full dimensional component while Reduce can. Use MaxExtraConditions->All option in Solve. $\endgroup$
    – Artes
    Sep 8, 2020 at 18:32
  • $\begingroup$ @Artes Perfect, thanks for the pointer (I did not find this before, as I did not know what to look for exactly). My take-away message is that Solve may omit some solutions, unless I provide the flag MaxExtraConditions -> All. Then, my example yields a warning which tells me to try Reduce. $\endgroup$
    – Peter
    Sep 8, 2020 at 18:40
  • 1
    $\begingroup$ @Peter Solve is less powerful than Reducein various cases (exceptional or full-dimensional ones). Take a look at the link in my comment. $\endgroup$
    – Artes
    Sep 8, 2020 at 18:50


Browse other questions tagged or ask your own question.