The function to be integrated may be a scalar field or a vector field. The value of the line integral is the sum of values of the field at all points on the curve, weighted by some scalar function on the curve (commonly arc length or, for a vector field, the scalar product of the vector field with a differential vector in the curve). This weighting distinguishes the line integral from simpler integrals defined on intervals. Many simple formulas in physics (for example, ) have natural continuous analogs in terms of line integrals (). The line integral finds the work done on an object moving through an electric or gravitational field, for example.
The function f is called the integrand, the curve C is the domain of integration, and the symbol ds may be heuristically interpreted as an elementary arc length. Line integrals of scalar fields do not depend on the chosen parametrization r.
A line integral of a scalar field is thus a line integral of a vector field where the vectors are always tangential to the line.
Line integrals of vector fields are independent of the parametrization r in absolute value, but they do depend on its orientation. Specifically, a reversal in the orientation of the parametrization changes the sign of the line integral.
which happens to be the integrand for the line integral of F on r(t). It follows that, given a path C , then
In words, the integral of F over C depends solely on the values of G in the points r(b) and r(a) and is thus independent of the path between them.
For this reason, a line integral of a vector field which is the gradient of a scalar field is called path independent.
may be defined by subdividing the interval [a, b] into a = t0 < t1 < ... < tn = b and considering the expression
The integral is then the limit of this sum, as the lengths of the subdivision intervals approach zero.
If is a continuously differentiable curve, the line integral can be evaluated as an integral of a function of a real variable:
When is a closed curve, that is, its initial and final points coincide, the notation
is often used for the line integral of f along .
The line integrals of complex functions can be evaluated using a number of techniques: the integral may be split in to real and imaginary parts reducing the problem to that of evaluating two real-valued line integrals, the Cauchy integral formula may be used in other circumstances. If the line integral is a closed curve in a region where the function is analytic and containing no singularities, then the value of the integral is simply zero, this is a consequence of the Cauchy integral theorem. Because of the residue theorem, one can often use contour integrals in the complex plane to find integrals of real-valued functions of a real variable (see residue theorem for an example).
Consider the function f(z)=1/z, and let the contour C be the unit circle about 0, which can be parametrized by eit, with t in [0, 2π]. Substituting, we find
provided that both integrals on the right hand side exist, and that the parametrization of C has the same orientation as .
Due to the Cauchy-Riemann equations the curl of the vector field corresponding to the conjugate of a holomorphic function is zero. This relates through Stokes' theorem both types of line integral being zero.
Also, the line integral can be evaluated using the change of variables.
The "path integral formulation" of quantum mechanics actually refers not to path integrals in this sense but to functional integrals, that is, integrals over a space of paths, of a function of a possible path. However, path integrals in the sense of this article are important in quantum mechanics; for example, complex contour integration is often used in evaluating probability amplitudes in quantum scattering theory.