Electromagnetic Theory · Coordinate Systems — Worked Example
#24 Converting P(−2, 6, 3) to cylindrical and spherical coordinates
Convert one Cartesian point into cylindrical and spherical coordinates, resolve the inverse-tangent quadrant, and check the geometry.
Question

Convert the same point P=(-2,6,3) from Cartesian coordinates into cylindrical (ρ,φ,z) and spherical (r,θ,φ) coordinates. Use a right-handed Cartesian system, ρ≥0, r≥0, azimuth φ in [0°,360°), and polar angle θ in [0°,180°] measured from the positive z-axis. Azimuth is measured counterclockwise from +x toward +y in the xy-plane. The spherical coordinate order here is (r,θ,φ); some conventions interchange the angle names, so keep these definitions explicit. All numerical angles in this example are in degrees. Compute ρ=√((-2)^2+6^2)=√40=2√10≈6.324555. Squaring the signed coordinate requires parentheses; (-2)^2 is4. The cylindrical radius measures distance to the z-axis, not distance to the origin. The height remains z=3. Both x and y are nonzero here. The principal inverse tangent arctan(y/x) is approximately−71.565051° and cannot by itself identify the point's quadrant. Call this provisional calculator output α; it is not the final azimuth. Since x<0 and y>0, add180° to obtain φ≈108.434949°. Equivalently use atan2(y,x) and normalize its range to [0°,360°). Do not apply the add180° rule indiscriminately to points in every quadrant. The line with−71.57° in the original formula panel is this provisional calculator result; the following quadrant-correction line and final triple give the actual φ. Compute r=√(ρ^2+z^2)=√49=7 and θ=arccos(z/r)=arccos(3/7)≈64.623067°. The azimuth is unchanged. Thus the cylindrical result is (2√10,108.43°,3), and the spherical result is (7,64.62°,108.43°), with only the displayed decimal angles rounded. Use unrounded values in inverse calculations: x=ρcosφ, y=ρsinφ, z=z, or x=r sinθ cosφ, y=r sinθ sinφ, z=r cosθ. Rounded angles reconstruct the Cartesian point approximately, not exactly. Check x<0 and y>0 against90°<φ<180°, and z>0 against0°<θ<90°. The polar angle is not elevation above the xy-plane; elevation is90°−θ≈25.38°. The source's phrase around100degrees is a broad quadrant check, not a replacement for108.43°. Similarly around65degrees is a geometric approximation. Radius7 and the right triangle with legs2√10 and3 are consistent. The introductory perspective illustration is schematic and is not a calibrated coordinate plot: its colored construction path does not start at the depicted axes' common origin. Use the explicit given components and the xy and ρ-z plane views to determine coordinates; do not read a new numerical position from that perspective path. Plane-view axes may use different screen scales; numerical labels and equations define lengths and angles. The notebook's first figure uses the original xy-plane view, showing only the projection; the separate height is3. No coordinate transformation moves the physical point. The next video's vector-field transformations additionally require changing the basis and components, which is outside this point-conversion problem.
Written solution and narration transcript(shows the full solution)
Below are all the lines written in the notebook together with the full narration transcript.
1. The given Cartesian point

The xy projection is (-2,6) in quadrant II. The given height is z=3. Measure φ counterclockwise from +x and θ down from +z; use the coordinate labels and equations, rather than measuring lengths or angles in the illustration. Identify the given point before changing coordinates.This worked example concerns a point in three-dimensional Euclidean space.A coordinate conversion describes the same point with a different ordered triple.Cartesian components:Given Cartesian point:Find the cylindrical triple (ρ, φ, z) and spherical triple (r, θ, φ).Narration transcript
Hi everyone. This is the first worked example of our Electromagnetic Theory series. We are going to do a coordinate conversion. We have a point P in Cartesian coordinates: x equals negative two, y equals six, z equals three. So P is at negative two, six, three. We need to express this same point first in cylindrical coordinates, then in spherical coordinates.
2. Cylindrical coordinates and quadrant

The xy projection is (-2,6) in quadrant II. The given height is z=3. Measure φ counterclockwise from +x and θ down from +z; use the coordinate labels and equations, rather than measuring lengths or angles in the illustration. Begin with the cylindrical representation.The coordinate order is radial distance ρ, azimuth φ, and height z.The cylindrical radius is the perpendicular distance from the z-axis.Measure azimuth counterclockwise from the positive x-axis in the xy-plane.The height remains the Cartesian z-coordinate.Cylindrical radius:Principal inverse-tangent value before quadrant correction:The unchanged height is the third cylindrical coordinate.Substitute the Cartesian values:Keep the negative coordinate inside parentheses when squaring:Exact radius and decimal approximation:Positive y and negative x place the point in quadrant II.The calculator returns the principal value in quadrant IV:Add 180 degrees to select quadrant II:The height is unchanged:Cylindrical coordinates, with rounded azimuth:Narration transcript
Let's start with cylindrical. In cylindrical coordinates a point is described by three values: rho, phi, and z. rho is the perpendicular distance from the z-axis. phi is the angle measured from the positive x-axis in the counter-clockwise direction. And z stays exactly the same z we had in Cartesian. The formulas are: rho equals the square root of x squared plus y squared. phi equals the arctangent of y over x, but be careful, you must pick the correct quadrant. And z equals z. Let's plug in: x is negative two, y is six. rho equals the square root of negative two squared, which is four, plus six squared, which is thirty six; together forty inside the root. Square root of forty is two root ten, approximately six point three two five. Now phi: y is positive and x is negative, so our point sits in the second quadrant. A calculator gives arctangent of six over negative two as about minus seventy one point five seven degrees, but that is a fourth-quadrant answer. To land in the second quadrant, we add one hundred eighty degrees: one hundred eighty minus seventy one point five seven equals one hundred eight point four three degrees. z is still three. So in cylindrical, P is: rho equals two root ten, phi equals one hundred eight point four three degrees, z equals three.
3. Spherical radius and polar angle

The xy projection is (-2,6) in quadrant II. The given height is z=3. Measure φ counterclockwise from +x and θ down from +z; use the coordinate labels and equations, rather than measuring lengths or angles in the illustration. Now express the same point in spherical coordinates.Use the ordered triple (r, θ, φ).The radius r is the distance from the origin; θ is the polar angle down from +z; φ is the same xy-plane azimuth.Spherical radius:Polar angle measured from the positive z-axis:The azimuth is shared by the cylindrical and spherical descriptions.Compute the radius:Compute the polar angle:Reuse the quadrant-corrected azimuth:Spherical coordinates, with rounded angles:Narration transcript
Now spherical. Again three values: r, theta, and phi. Here r is the distance from the origin straight to the point; theta is the angle measured down from the positive z-axis, called the polar angle; and phi is the same azimuthal angle we just computed. Formulas: r equals the square root of x squared plus y squared plus z squared. theta equals the arccosine of z over r. phi is identical to the cylindrical phi. Let's compute: r equals the square root of forty plus nine, square root of forty nine, exactly seven. theta equals arccosine of three over seven, which is about sixty four point six two degrees. phi we already know: one hundred eight point four three degrees. So in spherical, P is: r equals seven, theta equals sixty four point six two degrees, phi equals one hundred eight point four three degrees.
4. Geometric consistency

The xy projection is (-2,6) in quadrant II. The given height is z=3. Measure φ counterclockwise from +x and θ down from +z; use the coordinate labels and equations, rather than measuring lengths or angles in the illustration. The numerical conversion is complete.Check the signs and angles against the geometric position.The signs are negative x, positive y, and positive z.The xy projection is in quadrant II and the point is above the xy-plane.An azimuth near 108 degrees lies between 90 and 180 degrees, as required.A polar angle near 65 degrees lies between the positive z-axis and the xy-plane; it is neither a pole nor an equatorial point.The straight distance from the origin is seven units:The two plane views and the coordinate calculations are consistent.Narration transcript
We have the numbers. Now a quick geometric sanity check. Our point has x negative, y positive, z positive. So in the xy-plane it lies in the second quadrant, and it sits above the xy-plane. phi around one hundred degrees is consistent with being in the second quadrant. theta around sixty five degrees means the point is at a moderate tilt away from the z-axis, not at the pole, not at the equator. And r equals seven, a straight line of seven units from the origin. Everything matches the picture.
5. Coordinate triples recap

The xy projection is (-2,6) in quadrant II. The given height is z=3. Measure φ counterclockwise from +x and θ down from +z; use the coordinate labels and equations, rather than measuring lengths or angles in the illustration. Recap the coordinate order and the role of each angle.The Cartesian point (-2, 6, 3) becomes the cylindrical triple (2√10, 108.43°, 3).The spherical triple is (7, 64.62°, 108.43°), with θ measured from +z.The next topic concerns vector fields in different coordinate systems; transforming a point is distinct from transforming vector components.Keep the point fixed and check the quadrant whenever changing its coordinates.Narration transcript
Quick recap. The point that was negative two, six, three in Cartesian becomes two root ten, one hundred eight point four three degrees, three in cylindrical. And seven, sixty four point six two degrees, one hundred eight point four three degrees in spherical. In the next video we will see how vector fields transform between these three systems. See you then.
Source video: Electromagnetic Theory (v2) #24 | Problem Solving #01: Coordinate Conversion (4:26)