## LaTeX forum ⇒ Math & Science ⇒ I need use \pmatrix

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Venestor
Posts: 1
Joined: Fri Feb 21, 2020 12:03 am

### I need use \pmatrix

I input my formula from Maxima and I need use
\pmatrix{1&-2&3\cr -1&1&-2\cr 2&-1&-1\cr }I know to define matrix, should use \left[ \begin{array}{ccc}1 & -2 & 3 \\-1 & 1 & -2 \\2 & -1 & -1\end{array} \right]

I have error: ! Package amsmath Error: Old form \pmatrix' should be \begin{pmatrix}.

Is it any solution to do this. Maybe using command \def ??

Sorry for my english
Last edited by cgnieder on Sun Mar 01, 2020 5:12 pm, edited 1 time in total.

Ijon Tichy
Posts: 392
Joined: Mon Dec 24, 2018 10:12 am
There is an explanation of this error message in the amsmath manual amsldoc.pdf. You should replace the plainTeX command \pmatrix by the LaTeX environment pmatrix (also described in amsldoc), e.g.:
\begin{pmatrix}1&-2&3\\-1&1&-2\\ 2&-1&-1 \end{pmatrix}`

BTW: There are additional matrix environments in mathtools.

AFAIK it is possible to configure the TeX output of Maxima. So if it by default uses plainTeX output instead of LaTeX output you should reconfigure the matrix output. See the Maxima manual for more information. I do not know Maxima, so I cannot help on how to do this. However, how to change the output of Maxima isn't really a TeX question but a Maxima question.