Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not sure how to explain it, but whenever I compute something in Mathematica, the output always spits back the result in a Mathematica language as opposed to easy-to-read equations.

It's troublesome if my answer contains multiplies of parentheses and if my matrix is large.

Is there a way to make Mathematica display answers in "$\LaTeX$" form? So for instance, if i compute

RowReduce[{{1, 0}, {0, 1}}]

How do I make it spit out a square matrix instead of giving me back {{1, 0}, {0, 1}}?

share|improve this question
Try: {{1,0},{0,1}}//MatrixForm – kale Sep 22 '12 at 23:05
There is also TeXForm. TeXForm[{{1, 0}, {0, 1}}] gives: $\left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right)$ – Oleksandr R. Sep 22 '12 at 23:08
By the way, welcome to the site. Your question displays a bit more nicely now, too. ;) For future reference, here's the guide to formatting your posts. – Oleksandr R. Sep 22 '12 at 23:20
up vote 12 down vote accepted

Two possible answers.

  1. TexForm converts a Mathematica expression into something you can use to paste it in TeX:

    ==> \frac{x}{\sqrt{5}}

    A usually more convenient way of achieving this is right-clicking output, and selecting Copy as | LaTeX.

  2. If all you're looking for is a neater display form inside Mathematica, then have a look at MatrixForm and TraditionalForm.

    m = {{1, 2}, {3, 4}};

    enter image description here

    Be careful only to use these commands to display already existing values. For example, when you're writing something like

    m = TraditionalForm[{{1, 2}, {3, 4}}];

    then m is not assigned the matrix, but its TraditionalForm representation, which does not behave like a matrix anymore. The output of the above is simply a silly line:

    enter image description here

share|improve this answer
Thanks, but I am not solely interested in just displaying matrices, but also simplifying integrals, expressions, etc... – Hawk Sep 23 '12 at 0:37
@jak Then use a more illustrative example... You can't make matrices the focus of your question and expect us to divine that you actually wanted to simplify integrals – R. M. Sep 23 '12 at 0:59
Actually I just found the solution. Under "preference" and "evaluation" in Mathematica, we can switch the output cells to TraditionalForm – Hawk Sep 23 '12 at 2:05
Good to see you posting again, David. – Mr.Wizard Sep 23 '12 at 2:44
@Mr.Wizard My activity on SE highly depends on what I'm currently using. Blame Haskell for my inactivity :-) – David Sep 23 '12 at 19:43

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.