Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
\end{array}
share|improve this question
2  
It works perfectly with me. Please, provide a full Minimal (non-)Working Example. –  tohecz 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
1  
Perhaps you haven't entered mathmode using either $...$ or \[...\] –  cmhughes Sep 9 '12 at 0:54
add comment

1 Answer

up vote 2 down vote accepted

The following runs without errors:

\documentclass{article}
\begin{document}
\[
\begin{array}{c c c c}
\multicolumn{3}{c}{R} & P \\
0 & 0 & 0 & 1
\end{array}
\]
\end{document}

Result

share|improve this answer
add comment

Your Answer

 
discard

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.