A sphere (from Greek — sphaira, "globe, ball") is a perfectly round geometrical object in three-dimensional space that is the surface of a completely round ball, (viz., analogous to a circular object in two dimensions).
Like a circle, which geometrically is an object in two-dimensional space, a sphere is defined mathematically as the set of points that are all at the same distance r from a given point, but in three-dimensional space. This distance r is the radius of the ball, and the given point is the center of the mathematical ball. These are also referred to as the radius and center of the sphere, respectively. The longest straight line through the ball, connecting two points of the sphere, passes through the center and its length is thus twice the radius; it is a diameter of the (sphere) ball.
While outside mathematics the terms "sphere" and "ball" are sometimes used interchangeably, in mathematics a distinction is made between the sphere (a two-dimensional closed surface embedded in three-dimensional Euclidean space) and the ball (a three-dimensional shape that includes the sphere as well as everything inside the sphere). This distinction has not always been maintained and there are mathematical references, especially older ones, that talk about a sphere as a solid. This is analogous to the situation in the plane, where the terms "circle" and "disk" are confounded.
In analytic geometry, a sphere with center (x0, y0, z0) and radius r is the locus of all points (x, y, z) such that