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

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 want to output in MatrixForm whenever I have a list/vector/matrix, but I do not want to have to type out the command each time.

How can I write one command at the beginning of the notebook so that all output is so formatted? (Also: generalization to any formatting would be better, with additional specific detail included for this case.)

share|improve this question
closely related – Kuba Apr 15 '14 at 7:22
up vote 3 down vote accepted

You can use $Post:

$Post = If[ArrayQ@#, MatrixForm@#, #] &;

enter image description here

share|improve this answer
Is this what you are after? – Kuba Apr 15 '14 at 8:13
I think that that will do just fine! Thank you! (Could you explain what each pa‌​rt of that code does? Mathematica Documentation can confuse me easily and I like‌​ to be able to have multiple sources of explanation for the code.) – kevin Apr 16 '14 at 0:55
@kevin There is not much there, what is that you have problems with? Have you seen $Post? – Kuba Apr 16 '14 at 6:16

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.