Cylinder equation: Cartesian, parametric and cylindrical coordinates
The cylinder equation for a cylinder of radius r around the z-axis is x² + y² = r². Every point whose distance from the z-axis equals r satisfies it, at any height z. A shifted axis gives (x − a)² + (y − b)² = r², and in cylindrical coordinates the same surface is simply r = R.
Contents
A plane tilted 30° from a square cut meets the cylinder x² + y² = 9 (radius 3 in) in an ellipse with semi-axes 3 in and 3 ÷ cos 30° = 3.46 in. Its area is π × 3² ÷ cos 30° = 32.65 in².
The section tool above computes the area of the circle, ellipse or rectangle you get when a plane cuts a cylinder, the shapes the equations below describe.
The Cartesian equation x² + y² = r²
Take the z-axis as the axis of the cylinder. The distance from a point (x, y, z) to that axis is √(x² + y²). The cylinder of radius r is the set of points at exactly that distance, so √(x² + y²) = r, or after squaring:
x² + y² = r²
The variable z is missing on purpose. Whatever the height, the same circle condition holds, so the equation describes an infinite cylindrical surface. Add limits to get the solid you meet in geometry class:
| What you describe | Equation or inequalities |
|---|---|
| Infinite cylindrical surface | x² + y² = r² |
| Curved side of a finite cylinder | x² + y² = r², 0 ≤ z ≤ h |
| Solid cylinder (inside included) | x² + y² ≤ r², 0 ≤ z ≤ h |
| Points outside the cylinder | x² + y² > r² |
Example. Is the point (1.8, 2.4, 5) on the cylinder x² + y² = 9? Compute 1.8² + 2.4² = 3.24 + 5.76 = 9. Yes: it lies on the surface of radius 3, five units up. The point (1, 2, 0) gives 1 + 4 = 5 < 9, so it is inside.
The geometric picture behind these symbols, with the parts and types of cylinders, is on the page what is a cylinder.
Cylinder with a shifted axis
Move the axis so that it stays vertical but passes through the point (a, b) in the xy-plane. The distance to the axis becomes √((x − a)² + (y − b)²), and the equation is:
(x − a)² + (y − b)² = r²
Example 1. A cylinder of radius 4 whose axis passes through (2, −1): (x − 2)² + (y + 1)² = 16. Expanded, x² − 4x + 4 + y² + 2y + 1 = 16, that is x² + y² − 4x + 2y − 11 = 0. Check with the point (6, −1, 0): (6 − 2)² + 0² = 16. It is on the surface.
Example 2. Identify x² + y² − 6x + 8y = 0. Complete the squares: (x² − 6x + 9) + (y² + 8y + 16) = 9 + 16, so (x − 3)² + (y + 4)² = 25. It is a cylinder of radius 5 around the vertical line through (3, −4).
Axis parallel to the x-axis or the y-axis
The missing variable tells you the direction of the axis. Drop x and you get a cylinder along the x-axis; drop y and it runs along the y-axis.
| Axis | Equation | Free variable |
|---|---|---|
| z-axis | x² + y² = r² | z |
| x-axis | y² + z² = r² | x |
| y-axis | x² + z² = r² | y |
| Parallel to z, through (a, b) | (x − a)² + (y − b)² = r² | z |
A horizontal pipe lying along the x-axis with a radius of 0.5 m is y² + z² = 0.25. That is the setting of the horizontal cylinder volume problem, where a liquid level z = constant cuts the circle into a segment.
Axis in any direction
For an axis through a point P₀ with direction vector u, a point P is on the cylinder when its distance to that line equals r. Using the cross product, the equation is |(P − P₀) × u|² = r² |u|². Example: axis through the origin with direction u = (1, 1, 0), radius 2. The cross product (x, y, z) × (1, 1, 0) = (−z, z, x − y), so the equation is z² + z² + (x − y)² = 4 × 2, that is (x − y)² + 2z² = 8. The point (1, 1, 2), two units above the axis point (1, 1, 0), gives 0 + 8 = 8: it is on the surface.
Elliptical cylinder equation
Replace the circle by an ellipse with semi-axes a (along x) and b (along y):
x²/a² + y²/b² = 1
With a = b = r it is the circular cylinder again. Any closed curve in the xy-plane can play the same role; a polygon gives a prism, the case discussed on the page is a cylinder a prism. Example: x²/16 + y²/9 = 1 has semi-axes 4 and 3. Each horizontal slice is an ellipse of area π × 4 × 3 = 37.70 square units, so a piece 10 units tall has a volume of 376.99 cubic units. Oval tanks follow this model; see the elliptical cylinder volume page for measurements in gallons and liters.
Parametric equations of a cylinder
A parametric form gives each point of the surface from two numbers, an angle θ around the axis and a height z:
x = r cos θ, y = r sin θ, z = z, with 0 ≤ θ < 2π and 0 ≤ z ≤ h
Substitute into the Cartesian equation: r² cos² θ + r² sin² θ = r², so every point produced lies on the cylinder. Example: with r = 2, θ = π/3 (60°) and z = 5, the point is (2 cos 60°, 2 sin 60°, 5) = (1, 1.732, 5). For the shifted axis, add the center: x = a + r cos θ, y = b + r sin θ. For the elliptical cylinder: x = a cos θ, y = b sin θ.
This form is the one used to draw a cylinder in graphing software and to compute surface integrals. The area element on the side is r dθ dz; integrating θ from 0 to 2π and z from 0 to h gives the lateral area 2πrh, the formula used for the lateral surface area of a cylinder.
Cylindrical coordinates
Cylindrical coordinates (r, θ, z) locate a point by its distance r from the z-axis, its angle θ measured from the positive x-axis, and its height z. They are polar coordinates in the plane plus a height.
| Direction | Formulas |
|---|---|
| Cylindrical → Cartesian | x = r cos θ, y = r sin θ, z = z |
| Cartesian → cylindrical | r = √(x² + y²), θ = atan2(y, x), z = z |
Examples. The point (3, 3, 2) has r = √18 = 4.243 and θ = 45° (π/4), so it is (4.243, π/4, 2). The point (−2, 2√3, 1) has r = √(4 + 12) = 4 and θ = 120° (2π/3); use atan2 or check the quadrant, since a plain arctan(y/x) would give −60°. In the other direction, (5, 60°, 2) becomes x = 2.5, y = 4.330, z = 2.
In these coordinates the cylinder of radius R around the z-axis is just r = R. The solid cylinder is 0 ≤ r ≤ R, 0 ≤ θ < 2π, 0 ≤ z ≤ h: three independent ranges, which is why integrals over cylinders are easiest in this system.
Volume from the equation: the triple integral
In cylindrical coordinates the volume element is dV = r dr dθ dz (the extra factor r comes from the change of variables). The volume of the solid cylinder of radius R and height h is:
V = ∫₀ʰ ∫₀²π ∫₀ᴿ r dr dθ dz = (R²/2) × 2π × h = πR²h
The inner integral gives R²/2, the angle contributes 2π and the height h. Imperial example: R = 3 in and h = 8 in give π × 9 × 8 = 226.19 in³. Metric example: R = 0.5 m and h = 2 m give π × 0.25 × 2 = 1.5708 m³, that is 1,570.8 L. Other proofs of the same result, with stacked disks and Cavalieri's principle, are in why the volume of a cylinder is πr²h, and the cylinder volume calculator applies it to any measurements.
Common mistakes
- Reading x² + y² = r² as a circle in a 3D problem. In space it is a cylinder; the circle needs a second equation, such as z = 0.
- Forgetting to square the radius. A cylinder of radius 3 is x² + y² = 9, not x² + y² = 3.
- Sign errors with a shifted axis. (x − 2)² + (y + 1)² = 16 has its axis through (2, −1), not (−2, 1).
- Dropping the factor r in the integral. Without it, the triple integral gives 2πRh instead of πR²h.
- Using arctan(y/x) without checking the quadrant. Points with x < 0 need 180° added; atan2 handles it.
Tip: in any quadric equation, look for the missing variable first. If one of x, y or z does not appear, the surface is a cylinder in the general sense (circular, elliptical, even parabolic) whose generating lines are parallel to that variable's axis.
FAQ
What is the equation of a cylinder?
A cylinder of radius r whose axis is the z-axis has the equation x² + y² = r². The variable z does not appear, so it can take any value: every point at distance r from the z-axis is on the surface. A finite cylinder of height h adds the condition 0 ≤ z ≤ h.
What is the equation of a cylinder with a shifted axis?
If the axis is parallel to the z-axis and passes through the point (a, b) of the xy-plane, the equation is (x − a)² + (y − b)² = r². For example, (x − 2)² + (y + 1)² = 16 is a cylinder of radius 4 around the vertical line through (2, −1).
What is the parametric equation of a cylinder?
x = r cos θ, y = r sin θ, z = z, with θ from 0 to 2π and z from 0 to h for a finite cylinder. Each pair (θ, z) gives one point of the curved surface.
Why is x² + y² = r² a circle in 2D but a cylinder in 3D?
In the plane there are only x and y, so the equation picks out one circle. In space there is also z, and since the equation puts no condition on z, the circle is repeated at every height, which forms a cylinder.
What is the equation of a cylinder in cylindrical coordinates?
Simply r = R, where R is the radius: in cylindrical coordinates (r, θ, z), the cylinder is the set of points at constant distance R from the z-axis, whatever θ and z are.
Related
- What is a cylinderA cylinder is a solid with two parallel, congruent circular bases joined by a curved surface. Learn its parts, types, properties and formulas.
- Elliptic cylinderThe volume of an elliptic cylinder is V = πabh, with a and b the half-width and half-depth of the oval. Oval tank examples in gallons and liters, partial fill.
- DerivationWhy the volume of a cylinder is πr²h: stacked disks, polygon prisms, Cavalieri, the integral ∫ πr² dz, disks and shells, and why dV/dr is the side area 2πrh.
Updated October 12, 2026