Vector fields; surface integrals; flux (in space)


My notes of the excellent lectures 27 and 28 by “Denis Auroux. 18.02 Multivariable Calculus. Fall 2007. Massachusetts Institute of Technology: MIT OpenCourseWare, License: Creative Commons BY-NC-SA.”

We will learn about vector fields in space and determining the surface vector, using flux as an example.

Vector fields in space

Let \(\vec F\) be a vector field, where \(P,Q,R\) are functions of \(x,y,z\) $$ \vec F=\left\langle P,Q,R\right\rangle \nonumber $$

Some (not mutually exclusive) examples of vector fields

  • Force fields (e.g. gravitational attraction) of a solid mass at \((0,0,0)\) on a mass at \((x,y,z)\). \(\vec F\) directed towards origin with magnitude ~ \(\frac{c}{\rho^2}\), where \(\rho\) is the distance to the origin. $$ \vec F = -c\frac{\left\langle x,y,z\right\rangle}{\rho^3} \nonumber $$ Here \(\left\langle x,y,z\right\rangle\) goes from the origin to the point. It magnitude is \(\rho\). Also Electric fields, magnetic fields, etc.
  • Gradient fields, such as \(u=u(x,y,z)\), then $$ \nabla u = \left\langle u_x,u_y,u_z\right\rangle \nonumber $$ E.g. Electric fields and gravitational field are given by the gradient of the electric or gravitational potential.
  • Velocity fields (e.g. wind or fluid)

Surface integrals in a vector field

Remember flux in a 2D plane

In a plane, flux is a measure of how much a vector field is going across the curve. $$ \int_C\vec F\cdot\hat n\,ds \nonumber $$
In space, to have a flow through something you need a surface, e.g. a net. \(\Longrightarrow\) flux will be measured through a surface \(\Longrightarrow\) surface integral.

With the line integral in the plane, you had two variables, that you reduced to one using a parametric equation for the curve. In space, you have three variables that you will reduce to two variables by figuring out what the surface is.

Definition of flux in space

Let \(\vec F\) be a vector field, and \(S\) a surface in space. Flux measures how much the vector field is going across the surface.

Let \(\hat n\) be the unit normal vector to a piece of surface \(\Delta S\).

Flux in space

There are two choices for \(\hat n\). We need to choose a side of the surface (“orientation”). The usual choose is to take the normal vector pointing out of the region, because then you will be looking at flux that is coming out of that region of space. Or, if you have a surface that is not closed but you will want the flux going up through the region.

Once we have made that choice, we can define the flux integral $$ \shaded{ \rm{Flux} = \iint_S\vec F\cdot \hat n\,dS = \iint_S\vec F\cdot d\vec S } \label{ex:flux} $$


  • The big \(dS\) stands for the surface area element.
  • Vector \(d\vec S=\hat n\,dS\) points perpendicular to the surface element. Its length corresponds to the surface element \(dS\).
  • It is often easier to compute \(d\vec S\), than computing \(\hat n\) and \(dS\) seperately.


Use geometry, or set up \(\iint_S\vec F\cdot\hat n\,dS\)


Compute the flux of \(\vec F=\left\langle x,y,z\right\rangle\) through a sphere of radius \(a\) centered at the origin. The normal vector of the sphere points out radially from the origin.

\(\vec F\) and \(\hat n\) point radially out

Recall: the double integral for flux \(\eqref{ex:flux}\)

$$ \iint_S\vec F\cdot d\vec S=\iint_S\vec F\cdot\hat n\,dS \nonumber $$

The normal vector \(\hat n\) points radially out. Find the magnitude of \(\left\langle x,y,z\right\rangle\), then scale that down by its magnitude. $$ \begin{align*} |\left\langle x,y,z\right\rangle| &= \sqrt{x^2+y^2+z^2} =a \\ \Rightarrow \hat n &= \frac{\left\langle x,y,z\right\rangle}{a} \end{align*} \nonumber $$

The normal vector \(\hat n\) and field \(\vec F\) are parallel to each other $$ \begin{align*} \vec F\cdot\hat n &= |\vec F|\,\bcancel{|\hat n|}_1 \\ &= \sqrt{x^2+y^2+z^2} = \underline{a} \end{align*} \nonumber $$

The alternate way is to compute this is $$ \begin{align*} \vec F\cdot\hat n &= \left\langle x,y,z \right\rangle \cdot \frac{1}{a}\left\langle x,y,z \right\rangle \\ &= \frac{x^2+y^2+z^2}{a} \tag{$a^2=x^2+y^2+z^2$} \\ &= \frac{a^2}{a} = \underline{a} \end{align*} \nonumber $$

Substitute \(\vec F\cdot\hat n\) in the double integral for flux \(\eqref{ex:flux}\) $$ \begin{align*} \iint_S\underline{\vec F\cdot \hat n}\,dS &= \iint_S \underline{a}\,dS \\ &= a \underbrace{\iint_S dS}_{\text{area of }S} = a (4\pi a^2) = 4\pi a^3 \end{align*} \nonumber $$


Calculate the flux of \(\vec H=z\hat k=\left\langle 0,0,z \right\rangle\) through the same sphere.

The normal vector \(\hat n\) is the same $$ \hat n = \frac{1}{a}\left\langle x,y,z\right\rangle \nonumber $$

Compute the inside of the flux integral \(\iint_S\underline{\vec H\cdot\hat n}\,dS\) $$ \begin{align*} \vec H\cdot\hat n &= \left\langle 0,0,z \right\rangle \cdot \frac{1}{a}\left\langle x,y,z \right\rangle \\ &= \underline{\frac{z^2}{a}} \end{align*} \nonumber $$

Substitute this dot-product in the double integral for flux \(\eqref{ex:flux}\) $$ \iint_S\underline{\vec H\cdot \hat n}\,dS = \iint_S \frac{z^2}{a}\,dS \label{eq:ex2int} $$

Express \(dS\) in our favorite set of two variable used to integrate. In this case, we will use a part of the spherical coordinates, as \(\phi\) and \(\theta\) (we don’t use \(\rho\)) $$ dS =\ldots\,\, d\phi\, d\theta \nonumber $$

Recall the surface element from spherical coordinates

The surface \(\Delta S\) of this small piece of sphere $$ \begin{align*} \Delta S &\approx (a\sin\phi\,\Delta\theta)(a\,\Delta\phi) \\ \Rightarrow dS &= \underline{a^2\sin\phi\,d\phi\,d\theta} \end{align*} $$

Express the \(z\)-coordinates on the surface, in terms of \(\phi\) and \(\theta\)

\(z\)-coordinate on surface \(S\)

The expression for \(z\) on the surface $$ z = \underline{a\,\cos\phi} \nonumber $$

Substitute \(dS\) and \(z\) in equation \(\eqref{eq:ex2int}\). For the bounds \(\phi\) goes from the north pole to the south pole, and \(\theta\) goes all around. $$ \begin{align*} \iint_S\vec H\cdot \hat n\,dS &= \int_0^{2\pi} \int_0^\pi \frac{a^2\cos^2\phi}{a}(a^2\sin\phi\,d\phi\,d\theta) \\ &= a^3 \int_0^{2\pi} \underline{\int_0^\pi \cos^2\phi\,\sin\phi\,d\phi}\,d\theta \end{align*} \nonumber $$

For the middle integral, substitute \(u=\cos\phi \Rightarrow du=-sin\phi\,d\phi\) $$ \begin{align*} \int_0^\pi \underbrace{\cos^2\phi}_{u^2}\,\underbrace{\sin\phi\,d\phi}_{-du} &= -\int_{u=\cos 0}^{\cos\pi}u^2\,du \\ &= -\Big[ \frac{u^3}{3}\Big]_{\cos 0}^{u=\cos\pi} = -\frac{2}{3} \end{align*} $$

The flux follows from the outer integral $$ \begin{align*} \iint_S\vec H\cdot \hat n\,dS &= a^3\int_0^{2\pi}-\frac{2}{3}\,d\theta \\ &= -\frac{2}{3}a^3\Big[\theta\Big]_0^{\theta=2\pi} = \frac{4}{3}\pi a^3 \end{align*} $$

\(\hat n\,dS\) for various surfaces

Elementary surfaces

Horizontal plane

Let surface \(S\) be a horizontal plane, \(z=a\)

\(z=a\) in \(xyz\)-space

The normal vector \(\hat n\) and surface element \(dS\) on an horizontal plane $$ \shaded{ \begin{align*} \hat n &= \pm\hat k = \left\langle 0,0,\pm1\right\rangle \\ dS &= dx\,dy \end{align*} } \nonumber $$

When we take \(\vec F\cdot\hat n\), that will give the \(z\)-component which might involve \(x\), \(y\) and \(z\). It is easy to get rid of the \(z\) because \(z=a\). The \(x\) and \(y\) will stay as variables. Then integrate that \(dx\,dy\).

Vertical plane

Let surface \(S\) be a vertical plane \(\newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}} \parallelsum\,yz\)-plane, \(x=a\)

\(x=a\) in \(xyz\)-space

The variables for my position on the \(yz\)-plane would be \(y\) and \(z\). The normal vector \(\hat n\) and surface element \(dS\) on the vertical plane $$ \shaded{ \begin{align*} \hat n &= \pm\hat\imath = \left\langle \pm 1,0,0\right\rangle \\ dS &= dy\,dz \end{align*} } \nonumber \shaded{ } \nonumber $$


Let the surface \(S\) be a sphere of radius \(a\) at the origin

Sphere in \(xyz\)-space

The normal vector \(\hat n\) of this sphere is radial from the origin. As we saw earlier $$ \shaded{ \hat n = \pm\frac{\left\langle x,y,z\right\rangle}{a} } \nonumber $$

The surface element \(dS\) follows from the width \(\times\) height of the surface element \(\Delta S\) (see figure above) $$ \shaded{ dS = a^2 \sin\phi\,d\phi\,d\theta } \nonumber $$

It is best to start with the dot product \(\vec F\cdot\hat n\), because \(\vec F\) will be in terms of \(x,y,z\). If there is any kind of symmetry, you might end up with things that are easier to express in terms of \(\phi\) and \(\theta\). $$ \shaded{ \left\{ \begin{align*} x &= a\sin\phi\,\cos\theta \\ y &= a\sin\phi\,\sin\theta \\ z &= a\cos\phi \end{align*} \right. } \nonumber $$


Let the surface \(S\) be a cylinder of radius \(a\) centered on the \(z\)-axis

Cylinder in \(xyz\)-space

The normal vector \(\hat n\) of this cylinder sticks radially out in the horizontal directions $$ \shaded{ \hat n = \pm\frac{\left\langle x,y,0\right\rangle}{a} } \nonumber $$

The surface element \(dS\) $$ \shaded{ dS = a\,dz\,d\theta } \nonumber $$

You would calculate \(\vec F\cdot\hat n\), then expand \(dS\) and express the remaining \(x,y\) in terms of \(dz,d\theta\) $$ \shaded{ \left\{ \begin{align*} x &= a\cos\theta \\ y &= a\sin\theta \end{align*} \right. } \nonumber $$

Graph of a function

Let surface \(S\) be a graph of \(z=f(x,y)\)

Graph in \(xyz\)-space

To determine \(dS\), we approach it similarly to the flux in the plane. Reduce surface \(S\) to variables \(x\) and \(y\), by considering the shadow of surface \(S\) on the \(xy\)-plane. Then, the point \((x,y)\) in the shadow \(R\) corresponds to \((x,y,f(x,y))\) on surface \(S\).

\(\Delta x,\Delta y\) and \(\Delta S\)
Close up of \(\Delta S\)

Take a small rectangle in the shadow \(R\) on the \(xy\)-plane, that corresponds to \(\Delta x\Delta y\). This corresponds to \(\Delta S\) on the surface. If \(\Delta S\) is small enough, it will roughly look like a parallelogram. Find the two vectors \(\vec u\) and \(\vec v\) from this point on \(S\). The magnitude will be the surface \(\Delta S\), and the direction will be the normal to the surface \(\hat n\). $$ \pm\,\vec u\times\vec v=\hat n\,\Delta S \nonumber $$

The vector \(\vec u\) (see close up illustration above) $$ \begin{array}{llll} &\vec u: & \text{from} & (x,y,f(x,y)) \\ & & \text{to} & (x+\Delta x, y, \underbrace{f(x+\Delta x,y)}_{\approx f(x,y)+\Delta x.f_x}) \\ \Rightarrow &\vec u &\approx &\left\langle \Delta x,\,0,\,f_x\Delta x \right\rangle \\ &&\approx & \underline{\left\langle 1,\,0,\,f_x\right\rangle\Delta x} \end{array} \nonumber $$

Similarly, the vector \(\vec v\) $$ \begin{array}{llll} &\vec v: & \text{from} & (x,y,f(x,y)) \\ & & \text{to} & (x, y+\Delta y, \underbrace{f(x,y+\Delta y)}_{\approx f(x,y)+\Delta y.f_y}) \\ \Rightarrow &\vec v &\approx &\left\langle 0,\,\Delta y,\,f_y\Delta y \right\rangle \\ &&\approx & \underline{\left\langle 0,\,1,\,f_x\right\rangle\Delta y} \end{array} \nonumber $$

The cross-product of \(\vec u\) and \(\vec v\) gives us two in one: the normal vector \(\hat n\) multiplied with \(\Delta S\). $$ \begin{align*} \hat n\,\Delta S &\approx \pm\,\vec u\times\vec v \\ &\approx \pm\,\left| \begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ 1 & 0 & f_x \\ 0 & 1 & f_y \end{array} \right| \Delta x\Delta y \\ &\approx \pm \left\langle -f_x, -f_y, 1 \right\rangle\Delta x\Delta y \end{align*} $$

For the limit \(\Delta x,\Delta y\to 0\), \(d\vec S\) follows $$ \shaded{ d\vec S = \hat n\,dS = \pm\underbrace{\left\langle -f_x, -f_y, 1\right\rangle}_{\text{not }\hat n}\,\underbrace{dx\,dy}_{\text{not }dS} } \label{eq:fluxgraph} $$

If you take the \(+\), the \(z\)-component is positive, so the normal vector \(\hat n\) points up.


Find the flux of vector field \(\vec F=z\hat k=\left\langle 0,0,z\right\rangle\) through the portion of paraboloid \(z=x^2+y^2\) above the unit disk with the normal pointing upwards.

Vector field \(\vec F\), surface \(S\) and region \(R\)

Enter the vector field in the formula for the flux \(\eqref{ex:flux}\) $$ \begin{align*} \iint_S\vec F\cdot\hat n\,dS &= \iint_S\left\langle 0,0,z\right\rangle\cdot\hat n\,dS \end{align*} $$

Use equation \(\eqref{eq:fluxgraph}\) to find \(\hat n\,dS\) $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} \hat n\,dS &= \left\langle -\pdv{f}{x}, -\pdv{f}{y}, 1 \right\rangle\,dx,\,dy \\ &= \left\langle -2x, -2y, 1 \right\rangle\,dx,\,dy \end{align*} $$

The double integral fo flux becomes $$ \begin{align*} \iint_S\vec F\cdot\hat n\,dS &= \iint_S\left\langle 0,0,z\right\rangle\cdot\left\langle -2x, -2y, 1 \right\rangle\,dx,\,dy \\ &= \iint_S \underline{z}\,dx\,dy \end{align*} $$

To get rid of \(z\), use the expression for the surface \(z=x^2+y^2\) $$ \begin{align*} \iint_S\vec F\cdot\hat n\,dS &= \iint_S \underline{(x^2+y^2)}\,dx\,dy \end{align*} $$

The range for \(x\) and \(y\) is the shadow of the region (the unit disk). Switch to polar coordinates. For the unit disk: \(0\lt r\lt 1\) and \(0\lt\theta\lt 2\pi\) $$ \begin{align*} \iint_S\vec F\cdot\hat n\,dS &= \int_0^{2\pi} \int_0^1 r^2 r\,dr\,d\theta \\ &= \int_0^{2\pi} \Big[\frac{r^4}{4}\Big]_0^{r=1}\,d\theta \\ &= \int_0^{2\pi} \left(\frac{1^4}{4}-0\right)\,d\theta = \frac{\pi}{2}\\ \end{align*} $$

Parametric surface

Sometimes the function, for the surface, is so complicated that you can’t express \(z\) in terms of \(x\) and \(y\). In that case, we express \(x,y,z\) in terms of any two (parametric) variables, because on a surface you can only move in two independent directions. $$ S: \left\{ \begin{align*} x &= x(u,v) \\ y &= y(u,v) \\ z &= z(u,v) \end{align*} \right. $$

In other words, position vector \(\vec r\) is a function of \(u\) and \(v\) $$ \vec r = \left\langle x,y,z\right\rangle = \vec r(u,v) \nonumber $$

We can express \(\hat n\,dS\) in terms of \(du\,dv\), similar to what we did before: change by \(\Delta u\) and \(\Delta v\) in shadow \(R\).

\(\Delta u\) and \(\Delta v\)

Follow a similar approach as with \(\Delta \vec r\) for line integrals along a curve. The sides follow $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \left\{ \begin{align*} \pdv{\vec r}{u}\,\Delta u &= \left\langle \pdv{x}{u}, \pdv{y}{u}, \pdv{z}{u}\right\rangle \Delta u \\ \pdv{\vec r}{v}\,\Delta v &= \left\langle \pdv{x}{v}, \pdv{y}{v}, \pdv{z}{v}\right\rangle \Delta v \\ \end{align*} \right. \nonumber $$

To find the surface vector \(d\vec S\), take the cross-product $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} \hat n\Delta S &\approx \pm\,\left(\pdv{\vec r}{u}\Delta u\right) \times \left(\pdv{\vec r}{v}\Delta v \right) \\ &\approx \pm\,\left(\pdv{\vec r}{u} \times \pdv{\vec r}{v}\right)\Delta u\,\Delta v \\ \Rightarrow d\vec S = \hat n\,dS &= \pm\,\left(\pdv{\vec r}{u} \times \pdv{\vec r}{v}\right)\,du\,dv \\ \end{align*} $$


This will be the generic geometric way to think about \(\hat n\,dS\).

Say, we know a normal vector \(\vec N\) (with a capital because not necessary a unit vector) to surface \(S\). For example

  1. You know how a plane is slanted, such as the plane $$ \begin{align*} S &: ax+by+cz=d\\ \Rightarrow \vec N &= \left\langle a,b,c \right\rangle \end{align*} $$
  2. you know an equation in the form \(g(x,y,z)=0\) \(\Longrightarrow\) you know the gradient of \(g\) is perpendicular to the level surface $$ \begin{align*} S &: g(x,y,z)=0\\ \Rightarrow \vec N &= \nabla g \end{align*} $$

To find the surface vector \(\vec S\), express the surface in terms of two variables: \(x\) and \(y\). To do so, relate \(\Delta S\) to a projection of \(S\) on the \(xy\)-plane.

\(S\) and \(\vec N\)

Let \(\alpha\) be the angle between the plane and the \(xy\)-plane. If you project \(S\) on the \(xy\)-plane, the bottom and top sides don’t change, but the sides gets shortened by a factor of \(\cos\alpha\). $$ \Delta A = \Delta S \cos\alpha \nonumber $$

To get rid of the \(\cos\): the angle between two planes is the same as the angle between the normal vectors. This angle \(\alpha\) is the same angle as between \(\hat k\) and \(\vec N\). $$ \cos\alpha = \frac{\vec N\cdot\hat k}{|\vec n|.\bcancel{|\hat k|}_1} \nonumber $$

Combining the last two equations $$ \Delta S = \frac{1}{\cos\alpha}\Delta A = \frac{|\vec N|}{\vec N\cdot\hat k} \Delta A \nonumber $$

Multiply this by the unit normal vector \(\hat n\). The term \(\left|\vec N\right|\,\hat n\) equals \(\vec N\) again. The only thing we don’t know is the \(\pm\)-direction. $$ \begin{align*} \hat n\,\Delta S &= \frac{\cancel{|\vec N|\,\hat n}^{=\pm\vec N}}{\vec N\cdot\hat k}\Delta A \\ &= \pm\frac{\vec N}{\vec N\cdot\hat k}\Delta A \end{align*} $$

This brings us to $$ \shaded{ \hat n\,dS = \pm\frac{\vec N}{\vec N\cdot\hat k}\,dx\,dy } \nonumber $$

FYI You could also have projected to the \(yz\)-plane, and ended up with \(\hat\imath\) and \(dy\,dz\)


Surface given by the equation $$ \underbrace{z-f(x,y)}_{=g(x,y,z)} = 0 \nonumber $$

The normal vector \(\vec N\) would be $$ \begin{align*} \vec N &= \nabla g = \left\langle -f_x,-f_y,1 \right\rangle \\[1ex] \Rightarrow \frac{\vec N}{\vec N\cdot\hat k}\,dx\,dy &= \frac{\left\langle -f_x,-f_y,1 \right\rangle}{\left\langle -f_x,-f_y,,1 \right\rangle\cdot\left\langle 0,0,1\right\rangle} \\[1ex] &= \left\langle -f_x,-f_y,1 \right\rangle\,dx\,dy \end{align*} $$

That is matches formula \(\eqref{eq:fluxgraph}\). This one is actually more general because you don’t need to solve for \(z\).

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.