Scaling a point with homogeneous coordinates \((x, y, z, w)\) by factors \(s_\mathrm{x}\), \(s_\mathrm{y}\) and \(s_\mathrm{z}\) along the X-, Y- and Z-axis, respectively, is achieved by the following matrix multiplication:
\[ \begin{bmatrix}
s_\mathrm{x} & 0 & 0 & 0 \\
0 & s_\mathrm{y} & 0 & 0 \\
0 & 0 & s_\mathrm{z} & 0 \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\cdot
\begin{bmatrix}
x \\
y \\
z \\
w \\
\end{bmatrix}\]