Curved space
Curved space often refers to a spatial geometry which is not "flat", where a flat space has zero curvature, as described by Euclidean geometry. Curved spaces can generally be described by Riemannian geometry though some simple cases can be described in other ways. Curved spaces play an essential role in general relativity, where gravity is often visualized as curved space. The Friedmann–Lemaître–Robertson–Walker metric is a curved metric which forms the current foundation for the description of the expansion of space and shape of the universe.
Curved space often refers to a spatial geometry which is not "flat", where a flat space has zero curvature, as described by Euclidean geometry. Curved spaces can generally be described by Riemannian geometry though some simple cases can be described in other ways. Curved spaces play an essential role in general relativity, where gravity is often visualized as curved space. The Friedmann–Lemaître–Robertson–Walker metric is a curved metric which forms the current foundation for the description of the expansion of space and shape of the universe.

Simple two-dimensional example
A very familiar example of a curved space is the surface of a sphere. While to our familiar outlook the sphere looks three-dimensional, if an object is constrained to lie on the surface, it only has two dimensions that it can move in. The surface of a sphere can be completely described by two dimensions since no matter how rough the surface may appear to be, it is still only a surface, which is the two-dimensional outside border of a volume. Even the surface of the Earth, which is fractal in complexity, is still only a two-dimensional boundary along the outside of a volume.

Embedding
One of the defining characteristics of a curved space is its departure from the Pythagorean theorem. In a curved space 

  
    
      
        d
        
          x
          
            2
          
        
        +
        d
        
          y
          
            2
          
        
        ≠
        d
        
          l
          
            2
          
        
      
    
    {\displaystyle dx^{2}+dy^{2}\neq dl^{2}}
  .The Pythagorean relationship can often be restored by describing the space with an extra dimension.
Suppose we have a three-dimensional non-Euclidean space with coordinates 
  
    
      
        
          (
          
            
              x
              ′
            
            ,
            
              y
              ′
            
            ,
            
              z
              ′
            
          
          )
        
      
    
    {\displaystyle \left(x',y',z'\right)}
  . Because it is not flat 

  
    
      
        d
        
          x
          
            ′
            
              2
            
          
        
        +
        d
        
          y
          
            ′
            
              2
            
          
        
        +
        d
        
          z
          
            ′
            
              2
            
          
        
        ≠
        d
        
          l
          
            ′
            
              2
            
          
        
        
      
    
    {\displaystyle dx'^{2}+dy'^{2}+dz'^{2}\neq dl'^{2}\,}
  .But if we now describe the three-dimensional space with four dimensions (
  
    
      
        x
        ,
        y
        ,
        z
        ,
        w
      
    
    {\displaystyle x,y,z,w}
  ) we can choose coordinates such that 

  
    
      
        d
        
          x
          
            2
          
        
        +
        d
        
          y
          
            2
          
        
        +
        d
        
          z
          
            2
          
        
        +
        d
        
          w
          
            2
          
        
        =
        d
        
          l
          
            2
          
        
        
      
    
    {\displaystyle dx^{2}+dy^{2}+dz^{2}+dw^{2}=dl^{2}\,}
  .Note that the coordinate 
  
    
      
        x
      
    
    {\displaystyle x}
   is not the same as the coordinate 
  
    
      
        
          x
          ′
        
      
    
    {\displaystyle x'}
  .
For the choice of the 4D coordinates to be valid descriptors of the original 3D space it must have the same number of degrees of freedom. Since four coordinates have four degrees of freedom it must have a constraint placed on it. We can choose a constraint such that Pythagorean theorem holds in the new 4D space. That is 

  
    
      
        
          x
          
            2
          
        
        +
        
          y
          
            2
          
        
        +
        
          z
          
            2
          
        
        +
        
          w
          
            2
          
        
        =
        
          
            constant
          
        
        
      
    
    {\displaystyle x^{2}+y^{2}+z^{2}+w^{2}={\textrm {constant}}\,}
  .The constant can be positive or negative. For convenience we can choose the constant to be 

  
    
      
        
          κ
          
            −
            1
          
        
        
          R
          
            2
          
        
      
    
    {\displaystyle \kappa ^{-1}R^{2}}
   where 
  
    
      
        
          R
          
            2
          
        
        
      
    
    {\displaystyle R^{2}\,}
   now is positive and 
  
    
      
        κ
        ≡
        ±
        1
      
    
    {\displaystyle \kappa \equiv \pm 1}
  .We can now use this constraint to eliminate the artificial fourth coordinate 
  
    
      
        w
      
    
    {\displaystyle w}
  . The differential of the constraining equation is 

  
    
      
        x
        d
        x
        +
        y
        d
        y
        +
        z
        d
        z
        +
        w
        d
        w
        =
        0
        
      
    
    {\displaystyle xdx+ydy+zdz+wdw=0\,}
   leading to 
  
    
      
        d
        w
        =
        −
        
          w
          
            −
            1
          
        
        (
        x
        d
        x
        +
        y
        d
        y
        +
        z
        d
        z
        )
        
      
    
    {\displaystyle dw=-w^{-1}(xdx+ydy+zdz)\,}
  .Plugging 
  
    
      
        d
        w
      
    
    {\displaystyle dw}
   into the original equation gives

  
    
      
        d
        
          l
          
            2
          
        
        =
        d
        
          x
          
            2
          
        
        +
        d
        
          y
          
            2
          
        
        +
        d
        
          z
          
            2
          
        
        +
        
          
            
              (
              x
              d
              x
              +
              y
              d
              y
              +
              z
              d
              z
              
                )
                
                  2
                
              
            
            
              
                κ
                
                  −
                  1
                
              
              
                R
                
                  2
                
              
              −
              
                x
                
                  2
                
              
              −
              
                y
                
                  2
                
              
              −
              
                z
                
                  2
                
              
            
          
        
      
    
    {\displaystyle dl^{2}=dx^{2}+dy^{2}+dz^{2}+{\frac {(xdx+ydy+zdz)^{2}}{\kappa ^{-1}R^{2}-x^{2}-y^{2}-z^{2}}}}
  .This form is usually not particularly appealing and so a coordinate transform is often applied: 
  
    
      
        x
        =
        r
        sin
        ⁡
        θ
        cos
        ⁡
        ϕ
      
    
    {\displaystyle x=r\sin \theta \cos \phi }
  , 
  
    
      
        y
        =
        r
        sin
        ⁡
        θ
        sin
        ⁡
        ϕ
      
    
    {\displaystyle y=r\sin \theta \sin \phi }
  , 
  
    
      
        z
        =
        r
        cos
        ⁡
        θ
      
    
    {\displaystyle z=r\cos \theta }
  . With this coordinate transformation

  
    
      
        d
        
          l
          
            2
          
        
        =
        
          
            
              d
              
                r
                
                  2
                
              
            
            
              1
              −
              κ
              
                
                  
                    r
                    
                      2
                    
                  
                  
                    R
                    
                      2
                    
                  
                
              
            
          
        
        +
        
          r
          
            2
          
        
        d
        
          θ
          
            2
          
        
        +
        
          r
          
            2
          
        
        
          sin
          
            2
          
        
        ⁡
        θ
        d
        
          ϕ
          
            2
          
        
      
    
    {\displaystyle dl^{2}={\frac {dr^{2}}{1-\kappa {\frac {r^{2}}{R^{2}}}}}+r^{2}d\theta ^{2}+r^{2}\sin ^{2}\theta d\phi ^{2}}
  .

Without embedding
The geometry of a n-dimensional space can also be described with Riemannian geometry. An isotropic and homogeneous space can be described by the metric:

  
    
      
        d
        
          l
          
            2
          
        
        =
        
          e
          
            −
            λ
            (
            r
            )
          
        
        
          d
          
            r
            
              2
            
          
        
        +
        
          r
          
            2
          
        
        d
        
          θ
          
            2
          
        
        +
        
          r
          
            2
          
        
        
          sin
          
            2
          
        
        ⁡
        θ
        d
        
          ϕ
          
            2
          
        
        
      
    
    {\displaystyle dl^{2}=e^{-\lambda (r)}{dr^{2}}+r^{2}d\theta ^{2}+r^{2}\sin ^{2}\theta d\phi ^{2}\,}
  .This reduces to Euclidean space when 
  
    
      
        λ
        =
        0
      
    
    {\displaystyle \lambda =0}
  . But a space can be said to be "flat" when the Weyl tensor has all zero components. In three dimensions this condition is met when the Ricci tensor (
  
    
      
        
          R
          
            a
            b
          
        
      
    
    {\displaystyle R_{ab}}
  ) is equal to the metric times the Ricci scalar (
  
    
      
        R
      
    
    {\displaystyle R}
  , not to be confused with the R of the previous section). That is 
  
    
      
        
          R
          
            a
            b
          
        
        =
        
          g
          
            a
            b
          
        
        R
      
    
    {\displaystyle R_{ab}=g_{ab}R}
  . Calculation of these components from the metric gives that 

  
    
      
        λ
        =
        −
        
          
            1
            2
          
        
        ln
        ⁡
        
          (
          
            1
            −
            k
            
              r
              
                2
              
            
          
          )
        
      
    
    {\displaystyle \lambda =-{\frac {1}{2}}\ln \left(1-kr^{2}\right)}
   where 
  
    
      
        k
        ≡
        
          
            R
            2
          
        
      
    
    {\displaystyle k\equiv {\frac {R}{2}}}
  .This gives the metric:

  
    
      
        d
        
          l
          
            2
          
        
        =
        
          
            
              d
              
                r
                
                  2
                
              
            
            
              1
              −
              k
              
                
                  r
                  
                    2
                  
                
              
            
          
        
        +
        
          r
          
            2
          
        
        d
        
          θ
          
            2
          
        
        +
        
          r
          
            2
          
        
        
          sin
          
            2
          
        
        ⁡
        θ
        d
        
          ϕ
          
            2
          
        
      
    
    {\displaystyle dl^{2}={\frac {dr^{2}}{1-k{r^{2}}}}+r^{2}d\theta ^{2}+r^{2}\sin ^{2}\theta d\phi ^{2}}
  .where 
  
    
      
        k
      
    
    {\displaystyle k}
   can be zero, positive, or negative and is not limited to ±1.

Open, flat, closed
An isotropic and homogeneous space can be described by the metric:

  
    
      
        d
        
          l
          
            2
          
        
        =
        
          
            
              d
              
                r
                
                  2
                
              
            
            
              1
              −
              κ
              
                
                  
                    r
                    
                      2
                    
                  
                  
                    R
                    
                      2
                    
                  
                
              
            
          
        
        +
        
          r
          
            2
          
        
        d
        
          θ
          
            2
          
        
        +
        
          r
          
            2
          
        
        
          sin
          
            2
          
        
        ⁡
        θ
        d
        
          ϕ
          
            2
          
        
      
    
    {\displaystyle dl^{2}={\frac {dr^{2}}{1-\kappa {\frac {r^{2}}{R^{2}}}}}+r^{2}d\theta ^{2}+r^{2}\sin ^{2}\theta d\phi ^{2}}
  .In the limit that the constant of curvature (
  
    
      
        R
      
    
    {\displaystyle R}
  ) becomes infinitely large, a flat, Euclidean space is returned. It is essentially the same as setting 
  
    
      
        κ
      
    
    {\displaystyle \kappa }
   to zero. If 
  
    
      
        κ
      
    
    {\displaystyle \kappa }
   is not zero the space is not Euclidean. When 
  
    
      
        κ
        =
        +
        1
      
    
    {\displaystyle \kappa =+1}
   the space is said to be closed or elliptic. When 
  
    
      
        κ
        =
        −
        1
      
    
    {\displaystyle \kappa =-1}
   the space is said to be open or hyperbolic.
Triangles which lie on the surface of an open space will have a sum of angles which is less than 180°. Triangles which lie on the surface of a closed space will have a sum of angles which is greater than 180°. The volume, however, is not 
  
    
      
        (
        4
        
          /
        
        3
        )
        π
        
          r
          
            3
          
        
      
    
    {\displaystyle (4/3)\pi r^{3}}
  .

See also
CAT(k) space
Non-positive curvature

Further reading
The Feynman Lectures on Physics Vol. II Ch. 42: Curved Space
Papastavridis, John G. (1999). "General n-Dimensional (Riemannian) Surfaces". Tensor Calculus and Analytical Dynamics. Boca Raton: CRC Press. pp. 211–218. ISBN 0-8493-8514-8.

External links
Curved Spaces, simulator for multiconnected universes developed by Jeffrey Weeks