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.

Suppose I have a system of equations I'd like to present as a vector. Using amsmath, something like

\begin{equation}
\begin{pmatrix}
(2)(2)+(-1)(-3)  \\
(4)(2)+(3)(-3)
 \end{pmatrix}
\end{equation}

What I'd like to do is not simply 'center the equations' within the vector (easy enough), but have them center-aligned on the '+' sign. I've tried embedding align within pmatrix, but that doesn't seem to work. In the end, it isn't critical that the equations are presented within a formal 'matrix' structure -- I'd be satisfied with a 'large enough' left and right delimiter.

Any suggestions welcomed.

share|improve this question
1  
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. –  Claudio Fiandrino Oct 23 '13 at 13:12

2 Answers 2

You can use the aligned environment, which is like align but to be used inside another math environment

\begin{equation}
\begin{pmatrix}
\begin{aligned}
(2)(2)&+(-1)(-3)  \\
(4)(2)&+(3)(-3)
\end{aligned}
\end{pmatrix}
\end{equation}

enter image description here

Alternatively, without using pmatrix, you can get large left/right delimiters by using \left/\right before the delimiters. For example, the following will produce the same result

\begin{equation}
\left(
\begin{aligned}
(2)(2)&+(-1)(-3)  \\
(4)(2)&+(3)(-3)
\end{aligned}
\right)
\end{equation}
share|improve this answer

Is this what you mean?

enter image description here

If so, here is the code which uses my beta-version package \tabstackengine.sty, found at Writing a table with equally spaced columns, based on the widest column

\documentclass{article}
\usepackage{tabstackengine}
\begin{document}
\[
\left(
\alignVectorstack{
(2)(2) +& (-1)(-3)\\
(4)(2) +& (3)(-3)
}
\right)
\]
\end{document}
share|improve this answer

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.