# Alignment problem for a matrix

I have written the following matrix on Latex:

However, I would like the different elements to be aligned vertically, i.e.:

I have been unable to accomplish this. My code is the following:

$\phi_1(\mathbf{x}) = \left( \begin{array}{l} x_1^2 \\ \sqrt{2}x_1x_2 \\ x_2^2 \end{array} \right)$


Do you know how could I fix this?

l columns are left-aligned, while c columns are center aligned, so just change l to c in the array specification. That said, I'd rather use pmatrix from amsmath here.
\documentclass{article}
$\phi_1(\mathbf{x}) = \left( \begin{array}{c} x_1^2 \\ \sqrt{2}x_1x_2 \\ x_2^2 \end{array} \right)$
$\phi_1(\mathbf{x}) = \begin{pmatrix} x_1^2 \\ \sqrt{2}x_1x_2 \\ x_2^2 \end{pmatrix}$