TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. 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 want to create a matrix like the following in a math environment but i keep getting compile errors.

\begin{array}{c c c c}
\multicolumn{3}{c}{R} & P \\
0 & 0 & 0 & 1
share|improve this question
It works perfectly with me. Please, provide a full Minimal (non-)Working Example. – yo' Sep 8 '12 at 22:51
Could you be a bit more specific about the compile error message(s) you're getting? (You're missing \\ at the end of the second array line, but I assume that's not the error you're most concerned with.) Please also indicate the document class you're using, and whether you're using packages such as array that affect the properties of the array environment. – Mico Sep 8 '12 at 22:56
Perhaps you haven't entered mathmode using either $...$ or \[...\] – cmhughes Sep 9 '12 at 0:54
up vote 7 down vote accepted

The following runs without errors:

\begin{array}{c c c c}
\multicolumn{3}{c}{R} & P \\
0 & 0 & 0 & 1


share|improve this answer

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.