A **line integral** is an integral of a function taken over a curve. This can be done over both a scalar and vector field.

## Types of line integral

### Over a scalar field

Given the scalar function $ f(x,y) $ and the parametric curve $ x=g(t),y=h(t) $ , the line integral along the curve is given be the formula

- $ \int\limits_a^b f\big(g(t),h(t)\big)\sqrt{\left(\dfrac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2}dt $

Notice that if $ f(x,y)=1 $ , this reduces to the formula for arc length. Line integrals can also similarly be taken in three dimensions.

### Over a vector field

If a line integral is taken over the vector function $ \vec F(r) $ along the path $ r(t) $ , the formula is

- $ \int\limits_a^b\vec F\cdot\vec{dr}=\int\limits_a^b\vec F(r(t))\cdot r'(t)dt $

If the reverse parametrization is used for a line integral over a scalar field, there is no difference in the final answer. However, if the same is done over a vector field, the answer will be the negative of the normal parametrization.

By the gradient theorem, the value of any line integral over a conservative vector field, or one equal to the gradient of a scalar function, will depend only on the endpoints of the path; as such, a line integral over a closed loop will be equal to zero.

Line integrals can also be taken in the form

- $ \int_C\vec{F}\cdot\vec{\text{n}}\,ds $

in which case the vector field is being dotted with the normal, rather than tangent vector. This is a form of a flux integral.

### Over the complex plane

Line integrals over the complex plane, also known as **contour integrals**, are a fundamental tool in the complex analysis. Of particular importance are those over holomorphic and meromorphic functions, which behave very similarly to conservative vector fields (in that they exhibit path independence). Any closed integral over a meromorphic function will simply be equal to the sum of the residues of the poles inside the loop.

Given a path $ \gamma $ with endpoints $ a,b $ over a function which is holomorphic over said path, the contour integral is

- $ \int_\gamma f(z)dz=\int\limits_a^b f(z(t))z'(t)dt $