General relativity is a scientific theory describing how matter, energy, time, and space interact. It was first published by Albert Einstein in 1917 as an extension to his theory of special relativity. General relativity treats space and time as a single unified four-dimensional “spacetime”; under general relativity, matter deforms the geometry of spacetime, and spacetime deformations cause matter to move, which we see as gravity.
The basic assumption of general relativity is that forces caused by gravity and forces caused by acceleration are equivalent. If a closed box is undergoing acceleration, no experiment done within the box can tell if the box is at rest within a gravitational field, or is being accelerated through space. This principle, that all physical laws are the same for accelerated observers and observers in a gravitational field, is known as the equivalence principle; it has been experimentally tested to more than twelve decimal places of accuracy.
The most important consequence of the equivalence principle is that space cannot be Euclidean for all observers. In curved space, such as a warped sheet, the normal laws of geometry do not always hold. It is possible in curved space to construct a triangle whose angles add up to more or less than 180 degrees, or to draw two parallel lines which intersect. Special relativity becomes more and more accurate as the curvature of spacetime goes to zero; if spacetime is flat, the two theories become identical. How matter curves space is computed using the Einstein field equations, which take the form G = T; G describes the curvature of space, while T describes the distribution of matter.
Because space is curved, objects in general relativity do not always move in straight lines, just as a ball will not move in a straight line if you roll it into a funnel. A freely falling object will always take the shortest path from point A to point B, which is not necessarily a straight line; the line that it travels is known as a geodesic. We see the deviations from straight lines as the influence of “gravity”- the Earth does not move in a straight line because the Sun warps spacetime in the Earth's vicinity, making it move in an elliptical orbit.
As gravitational forces and accelerational forces are fully equivalent, all of the effects on a fast-moving object in special relativity also apply to objects deep in gravitational fields. An object close to a source of gravity will emit Doppler-shifted light, just as if it were speeding away. Objects close to gravitational sources will also appear to have time slow down, and any incoming light will be bent by the field. This can cause a strong gravity source to bend light like a lens, bringing distant objects into focus; this phenomenon is often found in deep-sky astronomy, where one galaxy will bend the light of another so that multiple images appear.