# Comma delimiter in pmatrix environment (for row vectors)

Is there a way to have a pmatrix environment from amsmath use non-whitespace delimiters such as a comma? I am mainly asking, because I would like to make a row vector this way. I take it, there are essentially two ways of doing something like that:

\documentclass{standalone}
\usepackage{mathtools}

\begin{document}
\begin{gather*}
a = \left(1,2,3\right) \\
b = \begin{pmatrix} 1, & 2, & 3 \end{pmatrix}
\end{gather*}
\end{document}


Now, especially the second part does not look too pretty:

• Possible Duplicate: Typesetting coordinates – Peter Grill May 16 '12 at 19:12
• Answer is given by: tex.stackexchange.com/a/53961/6993 – mSSM May 16 '12 at 19:14
• That actually reminds me: An even more elegant solution would be using the following from mathtools: \DeclarePairedDelimiter{\Vector}{\lparen}{\rparen}. – mSSM May 16 '12 at 19:17
• Isn't that the same question I linked to? – Peter Grill May 16 '12 at 19:31
• Yeah, I just wanted to point out the actual answer from that link. :) – mSSM May 16 '12 at 22:15

https://tex.stackexchange.com/a/53961/6993 provides one solution. It also reminded me of \DeclarePairedDelimiter from mathtools:

\documentclass{standalone}
\usepackage{mathtools}
\DeclarePairedDelimiter{\Vector}{\lparen}{\rparen}

\begin{document}
\begin{gather*}
a = \left(1,2,3\right) \\
b = \begin{pmatrix} 1, & 2, & 3 \end{pmatrix}
c = \Vector{1,2,3}
\end{gather*}
\end{document}


A starred version \Vector* would precede \lparen and \rparen by \left and \right, respectively.