In

geometry
Geometry (from the grc, γεωμετρία; ' "earth", ' "measurement") is, with , one of the oldest branches of . It is concerned with properties of space that are related with distance, shape, size, and relative position of figures. A mat ...

, a diameter of a circle
A circle is a shape
A shape or figure is the form of an object or its external boundary, outline, or external surface
File:Water droplet lying on a damask.jpg, Water droplet lying on a damask. Surface tension is high enough to preven ...

is any straight line segment
250px, The geometric definition of a closed line segment: the intersection of all points at or to the right of ''A'' with all points at or to the left of ''B''
In geometry
Geometry (from the grc, γεωμετρία; ''wikt:γῆ, geo-'' ...

that passes through the center of the circle and whose endpoints lie on the circle. It can also be defined as the longest chord
Chord may refer to:
* Chord (music), an aggregate of musical pitches sounded simultaneously
** Guitar chord a chord played on a guitar, which has a particular tuning
* Chord (geometry), a line segment joining two points on a curve
* Chord (ast ...

of the circle. Both definitions are also valid for the diameter of a sphere
A sphere (from Greek language, Greek —, "globe, ball") is a Geometry, geometrical object that is a solid geometry, three-dimensional analogue to a circle in two-dimensional space. A sphere is the Locus (mathematics), set of points that are ...

.
In more modern usage, the length $d$ of a diameter is also called the diameter. In this sense one speaks of diameter rather than diameter (which refers to the line segment itself), because all diameters of a circle or sphere have the same length, this being twice the radius
In classical geometry
Geometry (from the grc, γεωμετρία; ' "earth", ' "measurement") is, with , one of the oldest branches of . It is concerned with properties of space that are related with distance, shape, size, and relative ...

$r.$
$d\; =\; 2r\; \backslash qquad\; \backslash text\; \backslash qquad\; r\; =\; \backslash frac.$
For a convex
Convex means curving outwards like a sphere, and is the opposite of concave. Convex or convexity may refer to:
Science and technology
* Convex lens
A lens is a transmissive optics, optical device which focuses or disperses a light beam by me ...

shape in the plane
Plane or planes may refer to:
* Airplane
An airplane or aeroplane (informally plane) is a fixed-wing aircraft
A fixed-wing aircraft is a heavier-than-air flying machine
Early flying machines include all forms of aircraft studied ...

, the diameter is defined to be the largest distance that can be formed between two opposite parallel lines
In geometry, parallel lines are line (geometry), lines in a plane (geometry), plane which do not meet; that is, two straight lines in a plane that do not intersecting lines, intersect at any point are said to be parallel. Colloquially, curves tha ...

tangent
In geometry
Geometry (from the grc, γεωμετρία; ' "earth", ' "measurement") is, with , one of the oldest branches of . It is concerned with properties of space that are related with distance, shape, size, and relative position ...

to its boundary, and the is often defined to be the smallest such distance. Both quantities can be calculated efficiently using rotating calipers
In computational geometry, the method of rotating calipers is an algorithm design technique that can be used to solve optimization problems including finding the width or diameter of a set of points.
The method is so named because the idea is anal ...

. For a curve of constant width
In geometry
Geometry (from the grc, γεωμετρία; ''wikt:γῆ, geo-'' "earth", ''wikt:μέτρον, -metron'' "measurement") is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space th ...

such as the Reuleaux triangle
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle ...

, the width and diameter are the same because all such pairs of parallel tangent lines have the same distance.
For an ellipse
In , an ellipse is a surrounding two , such that for all points on the curve, the sum of the two distances to the focal points is a constant. As such, it generalizes a , which is the special type of ellipse in which the two focal points are t ...

, the standard terminology is different. A diameter of an ellipse is any chord
Chord may refer to:
* Chord (music), an aggregate of musical pitches sounded simultaneously
** Guitar chord a chord played on a guitar, which has a particular tuning
* Chord (geometry), a line segment joining two points on a curve
* Chord (ast ...

passing through the centre of the ellipse. For example, conjugate diameters
In geometry, two diameters of a conic section are said to be conjugate if each chord (geometry), chord parallel (geometry), parallel to one diameter is bisection, bisected by the other diameter. For example, two diameters of a circle are conjugate ...

have the property that a tangent line to the ellipse at the endpoint of one diameter is parallel to the conjugate diameter. The longest diameter is called the major axis
In geometry
Geometry (from the grc, γεωμετρία; ''wikt:γῆ, geo-'' "earth", ''wikt:μέτρον, -metron'' "measurement") is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space t ...

.
The word "diameter" is derived from grc, διάμετρος (), "diameter of a circle", from (), "across, through" and (), "measure". It is often abbreviated $\backslash text,\; \backslash text,\; d,$ or $\backslash varnothing.$
Generalizations

The definitions given above are only valid for circles, spheres and convex shapes. However, they are special cases of a more general definition that is valid for any kind of $n$-dimensional (convex or non-convex) object, such as ahypercube
In geometry
Geometry (from the grc, γεωμετρία; ' "earth", ' "measurement") is, with , one of the oldest branches of . It is concerned with properties of space that are related with distance, shape, size, and relative position of ...

or a set of scattered points. The or of a subset
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...

of a metric space
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gene ...

is the least upper bound
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

of the set of all distances between pairs of points in the subset. Explicitly, if $S$ is the subset and if $\backslash rho$ is the metric
METRIC (Mapping EvapoTranspiration at high Resolution with Internalized Calibration) is a computer model
Computer simulation is the process of mathematical modelling, performed on a computer, which is designed to predict the behaviour of or th ...

, the diameter is
$$\backslash operatorname(S)\; =\; \backslash sup\_\; \backslash rho(x,\; y).$$
If the metric $\backslash rho$ is viewed here as having codomain
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

$\backslash R$ (the set of all real number
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no g ...

s), this implies that the diameter of the empty set #REDIRECT Empty set #REDIRECT Empty set#REDIRECT Empty set
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry ...

(the case $S\; =\; \backslash varnothing$) equals $-\; \backslash infty$ (negative infinity
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...

). Some authors prefer to treat the empty set as a special case, assigning it a diameter of $0,$ which corresponds to taking the codomain of $d$ to be the set of nonnegative reals.
For any solid object or set of scattered points in $n$-dimensional Euclidean space
Euclidean space is the fundamental space of classical geometry. Originally, it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean spaces of any nonnegative integer dimension (mathematics), dimens ...

, the diameter of the object or set is the same as the diameter of its convex hull
In geometry
Geometry (from the grc, γεωμετρία; ''wikt:γῆ, geo-'' "earth", ''wikt:μέτρον, -metron'' "measurement") is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space t ...

. In medical parlance
{{Short pages monitor