The canonical momentum is defined as
$$p_{i} = \frac {\partial L}{\partial \dot{q_{i}}}, $$ where $L$ is the Lagrangian.
So actually how does $p_{i}$ transform in one coordinate system $\textbf{q}$ to another coordinate system $\textbf{Q}$?
https://en.wikipedia.org/wiki/Hamiltonian_mechanics#Charged_particle_in_an_electromagnetic_field
When dealing with the Hamiltonian of the electromagnetic field, the derivation of $$p_{j} = m \dot{x_j} + eA_j$$ on the above link is usually written as $$\textbf{p} = m \textbf{v} + e\textbf{A}$$
but the derivation is based on using Cartesian coordinates, does it mean that $\textbf{p}$ is really a vector? If we are using another general coordinates, say, spherical coordinates, can we still have $$\textbf{p} = m \textbf{v} + e\textbf{A}~ ?$$ If no, I think the form of Hamiltonian in electromagnetic field
$$H = \frac{(\textbf{p} - e\textbf{A})^2}{2m} + e\phi$$
will only be valid in Cartesian coordinates. In any other coordinates, $H$ carries a different form!
Any comments are appreciated.