# LinearSolve 30x20 matrix with algebraic entries

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?

• Will a numeric solution satisfy you? Commented Jul 4, 2017 at 6:04
• 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). Commented Jul 4, 2017 at 6:09
• You really should provide an explicit example. Could be smaller than the actual problem if that helps. Commented Jul 4, 2017 at 19:31
• 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]]]. Commented Jul 5, 2017 at 22:25