## Transforming a Vector Field From Cartesian to Cylindrical Form

We can rewrite the vector field
$\mathbf{F} = 2y \mathbf{i} - 3x \mathbf{j} + xz \mathbf{k}$
in cylindrical coordinates using
$x= r cos \theta$

$y= r sin \theta$

$z= z$

and the transformation matrix vrom Euclidean to cylindrical to polar coordinates
$\begin{pmatrix}\mathbf{i}\\ \mathbf{j} \\ \mathbf{j} \end{pmatrix} = \left( \begin{array}{ccc} \cos \theta & -sin \theta & 0 \\ sin \theta & cos \theta & 0 \\ 0 & 0 & 1 \end{array} \right) \begin{pmatrix} \mathbf{e_r}\\ \mathbf{e_{\theta}} \\ \mathbf{e_z}\end{pmatrix}$

so that
$\mathbf{i} = cos \theta \mathbf{e_r} - sin \theta \mathbf{e_{\theta}}$

$\mathbf{j} = sin \theta \mathbf{e_r} + cos \theta \mathbf{e_{\theta}}$

$\mathbf{k} = \mathbf{e_z}$

Then
\begin{aligned} \mathbf{F} &= 2 r sin \theta (cos \theta \mathbf{e_r} - sin \theta \mathbf{e_{\theta}}) -3 r cos \theta (sin \theta \mathbf{e_r} + cos \theta \mathbf{e_{\theta}}) + r cos \theta (z) \mathbf{e_z} \\ &= r(2 sin \theta cos \theta - 3 sin \theta cos \theta) \mathbf{e_r} - - r(2 sin^2 \theta + 3 cos^2 \theta ) \mathbf{e_{\theta}} + r cos \theta z \mathbf{e_z} \\ &= -r cos \theta sin \theta \mathbf{e_r} - r(2+ cos^2 \theta ) \mathbf{e_{\theta}} + rz cos \theta \mathbf{e_z} \end{aligned}