3

I am trying to align the entries of this vector to the left. Could you help me please? Below is my code and next the result.

P=\left(\begin{matrix}
p^{(1)}(x_1,x_2,\cdots,x_{r_1})  \\
\vdots\\
p^{(m_1)}(x_1,x_2,\cdots,x_{r_1}) \\
p^{(m_1+1)}(x_1,x_2,\cdots,x_{r_1}, x_{r_1+1},x_{r_1+2},\cdots,x_{r_2})  \\
\vdots\\
p^{(m_2)}(x_{r_1+1},x{r_1+_2},\cdots,x_{r_1}, x_1,x_2,\cdots,x_{r_2})    \\
\end{matrix}\right)

enter image description here

Werner
  • 603,163
juaninf
  • 367

2 Answers2

7

I assume, that you like to have left aligned (now is as is standard for matrices/vector notation. In this case the `array become handy:

\documentclass{article}

    \begin{document}
\[
P=\left(\begin{array}{l}
    p^{(1)}(x_1,x_2,\cdots,x_{r_1})  \\
\vdots\\
    p^{(m_1)}(x_1,x_2,\cdots, x_{r_1}) \\
    p^{(m_1+1)}(x_1,x_2,\cdots,x_{r_1}, x_{r_1+1},x_{r_1+2},\cdots,x_{r_2})  \\
\vdots\\
    p^{(m_2)}(x_{r_1+1},x{r_1+_2},\cdots,x_{r_1}, x_1,x_2,\cdots,x_{r_2})    \\
\end{array}\right)
\]
    \end{document}

enter image description here

Zarko
  • 296,517
3

I propose a slight improvement to @campa's solution, to have a better alignment of the vertical dots:

\documentclass{article}

\usepackage{mathtools}
\usepackage{eqparbox}

\begin{document}
\[
  P=\begin{pmatrix*}[l]
  \eqmakebox[P][l]{$ p^{(1)}(x₁,x₂, ⋯ ,x_{r₁}) $} \\
  \eqmakebox[P]{$ ⋮ $}\\
  \eqmakebox[P]{$ p^{(m₁)}(x₁,x₂, ⋯ ,x_{r₁}) $}\\
  p^{(m₁+1)}(x₁,x₂, ⋯ ,x_{r₁}, x_{r₁+1},x_{r₁+2}, ⋯ ,x_{r₂}) \\
  \eqmakebox[P]{$ ⋮ $}\\
  p^{(m₂)}(x_{r₁+1},x{r₁+₂}, ⋯ ,x_{r₁}, x₁,x₂, ⋯ ,x_{r₂}) \\
  \end{pmatrix*}
\]
\end{document} 

enter image description here

Bernard
  • 271,350