I have a $30\times 20$ matrix $A$ with entries of the form $x+y\zeta$ where $\zeta$ is a third root of unity and $x,y$ are rational. I want to solve an equation of the form $AX=B$ where $B$ is a specified column vector (this is a very overdetermined system but I know there is a unique solution). I tried LinearSolve, but it was too slow. I think the expressions involving roots of unity are getting very large in the middle of the computation and Mathematica doesn't simplify the intermediate expressions (any intermediate expression will of course have the form $x+y\zeta$). Is there a way to make Mathematica simplify intermediate expressions in the computation? If so, will this solve the problem?

  • $\begingroup$ Will a numeric solution satisfy you? $\endgroup$ – m_goldberg Jul 4 '17 at 6:04
  • $\begingroup$ I considered converting everything to decimals, expecting that the run time would be significantly faster. I'd be willing to if necessary, since the answer is ultimately going to be used to compute some rational numbers with small denominator (which should be easy to guess from the decimal). $\endgroup$ – Philip Engel Jul 4 '17 at 6:09
  • $\begingroup$ You really should provide an explicit example. Could be smaller than the actual problem if that helps. $\endgroup$ – Daniel Lichtblau Jul 4 '17 at 19:31
  • $\begingroup$ I converted everything to decimal. It quickly solved. Then I converted back to algebraic form using z = Rationalize[Re[z]]+Sqrt[3]*I*Rationalize[Im[z/Sqrt[3]]]. $\endgroup$ – Philip Engel Jul 5 '17 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.