[Tex/LaTex] Adjusting space between array rows and columns

arrayslyxspacing

Output

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\begin{document}
% ...
\[
\begin{array}{ccccc}
x(1) & = & \frac{x(0)}{1} & = & x(0)\\
x(2) & = & \frac{x(1)}{2} & = & \frac{x(0)}{2}\\
x(3) & = & \frac{x(2)}{3} & = & \frac{x(0)}{2.3}\\
x(4) & = & \frac{x(3)}{4} & = & \frac{x(0)}{4!}\\
 &  &  &  & \vdots\\
x(n) & = & \frac{x(n-1)}{n} & = & \frac{x(0)}{n!}
\end{array}
\]
% ...
\end{document}

Because of the fractions in the array cells, array elements are vertically too close to each other, they are literally touching to each other. Also the horizontal spacing is too much as you see in the image (screen shot from the output PDF file).

How do I make these cell-spacings look better?

Best Answer

\documentclass{article}
\usepackage{amsmath}
\begin{document}
% ...
\[\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{ccccc}
x(1) & = & \dfrac{x(0)}{1} & = & x(0)\\
x(2) & = & \dfrac{x(1)}{2} & = & \dfrac{x(0)}{2}\\
x(3) & = & \dfrac{x(2)}{3} & = & \dfrac{x(0)}{2.3}\\
x(4) & = & \dfrac{x(3)}{4} & = & \dfrac{x(0)}{4!}\\
 &  &  &  & \vdots\\
x(n) & = & \dfrac{x(n-1)}{n!} & = & \dfrac{x(0)}{n!}
\end{array}
\]
% ...
\end{document}

enter image description here

or for a left aligned:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
% ...
\[\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{rll}
x(1) &= \dfrac{x(0)}{1} &= x(0)\\
x(2) &= \dfrac{x(1)}{2} &= \dfrac{x(0)}{2}\\
x(3) &= \dfrac{x(2)}{3} &= \dfrac{x(0)}{2.3}\\
x(4) &= \dfrac{x(3)}{4} &= \dfrac{x(0)}{4!}\\
     &                  & \vdots\\
x(n) &= \dfrac{x(n-1)}{n!} &= \dfrac{x(0)}{n!}
\end{array}
\]
% ...
\end{document}

enter image description here