The position vector r and the linear momentum p of the particle are written in terms of `x,y,z` components as
`r=x hat(i) + y hat(j) + z hat(k)`
and `r = p_(x) hat(i) + p_(y) hat(j)+p_(z) hat(k)`
By definition the angular momentum of the particle is
`= |{:(hat(i),hat(j),hat(k)),(x,y,z),(p_(x),p_(y),p_(z)):}|`
`=hat(i)(y p_(z)-zp_(y))+hat(j)(zp_(x)-xp_(z))+hat(k)(xp_(y)-yp_(x))`....(i)
The angular momentum may be written in terms of x,y,z components as
`J = J_(x) hat(i)+J_(y) hat(j)+J_(z) hat(k)` ...(ii)
Comparing Eqs. (i) and (ii), we have
`J_(x)=yp_(z)-zp_(y)`
`J_(y)=zp_(x)-xp_(z)`
and `J_(z)= zp_(y)-yp_(x)`,
If the particle moves only in the xy-plane, then `z=0` adn `p_(z)=0` Now, Eq. (i) will be
`J=(xp_(y)-yp_(x))hat(k)`
i.e., J has only z-component.