Math & ScienceI need use \pmatrix

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

I need use \pmatrix

Post by Venestor »

I input my formula from Maxima and I need use

Code: Select all

\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 ??
Please help.

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

I need use \pmatrix

Post by Ijon Tichy »

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.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply