Engineering Mathematics‹›⌂ 0:00 studied

Module 1 · 10 min read · Free chapter

Vector calculus: gradient, divergence, curl and the integral theorems

In short

Vector calculus describes fields such as temperature, fluid velocity and electric fields. The gradient points to the steepest rise, divergence measures outflow from a point, and curl measures rotation. Gauss's theorem links a volume integral of divergence to flux through the surface, and Stokes's theorem links curl to circulation.

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: arrows that fill space

On a weather map, every city has a temperature, a single number. That is a scalar field. The same map also shows the wind, which at each city has both a speed and a direction. That is a vector field, and it is drawn as an arrow at every point.

Engineering is full of both kinds. Temperature, pressure and electric potential are scalar fields, while water velocity, heat flow, electric field and magnetic field are vector fields. Vector calculus asks how these fields change from place to place. It also connects what happens inside a region with what crosses its boundary.

Two products of vectors are needed first. The dot product A⋅B=∣A∣∣B∣cos⁡θ\mathbf{A} \cdot \mathbf{B} = \lvert \mathbf{A} \rvert \lvert \mathbf{B} \rvert \cos\theta is a plain number, and it is zero when the vectors are perpendicular. Work done by a force, F⋅d\mathbf{F} \cdot \mathbf{d}, is a dot product.

The cross product A×B\mathbf{A} \times \mathbf{B} has size ∣A∣∣B∣sin⁡θ\lvert \mathbf{A} \rvert \lvert \mathbf{B} \rvert \sin\theta and points at right angles to both, found with the right-hand rule. It is zero for parallel vectors, and A×B=−B×A\mathbf{A} \times \mathbf{B} = -\mathbf{B} \times \mathbf{A}. Torque, r×F\mathbf{r} \times \mathbf{F}, is a cross product.

Why it matters. GATE ME, EE, EC and CE all list this topic. Fluid flow, heat conduction and Maxwell's equations of electromagnetism are written in this language.

Gradient and the directional derivative

Stand on a hillside and ask which way is steepest uphill. The answer is the gradient of the height. For a scalar field φ(x,y,z)\varphi(x, y, z), it is the vector ∇φ=∂φ∂xi+∂φ∂yj+∂φ∂zk\nabla\varphi = \dfrac{\partial \varphi}{\partial x}\mathbf{i} + \dfrac{\partial \varphi}{\partial y}\mathbf{j} + \dfrac{\partial \varphi}{\partial z}\mathbf{k}, where ∇\nabla (del) is the operator ∂∂xi+∂∂yj+∂∂zk\dfrac{\partial}{\partial x}\mathbf{i} + \dfrac{\partial}{\partial y}\mathbf{j} + \dfrac{\partial}{\partial z}\mathbf{k}.

The gradient has three properties worth remembering. It points in the direction of fastest increase, and its size is that greatest rate of increase. It is also perpendicular (normal) to the level surface φ=constant\varphi = \text{constant} through the point. So the unit normal to a surface φ=c\varphi = c is ∇φ∣∇φ∣\dfrac{\nabla\varphi}{\lvert \nabla\varphi \rvert}.

The rate of change in any other direction is the directional derivative, ∇φ⋅a^\nabla\varphi \cdot \hat{\mathbf{a}}, where a^\hat{\mathbf{a}} is a unit vector. It is largest along ∇φ\nabla\varphi, zero along the level surface, and most negative straight downhill.

Worked example. For φ=x2y+yz\varphi = x^2y + yz at (1,2,1)(1, 2, 1), ∇φ=(2xy, x2+z, y)=(4,2,2)\nabla\varphi = (2xy,\ x^2 + z,\ y) = (4, 2, 2). In the direction (1,2,2)3\dfrac{(1, 2, 2)}{3}, the directional derivative is 4+4+43=4\dfrac{4 + 4 + 4}{3} = 4. The greatest rate of increase is ∣∇φ∣=24≈4.9\lvert \nabla\varphi \rvert = \sqrt{24} \approx 4.9.

Why it matters. Heat flows along −∇T-\nabla T, from hot to cold, and the electric field is E=−∇V\mathbf{E} = -\nabla V. In both cases, the gradient of a scalar gives the push that drives the flow.

Divergence and curl: spreading and spinning

Put a tiny imaginary balloon in a flowing fluid. If more fluid leaves it than enters, there is a source inside. The divergence measures this net outflow per unit volume: ∇⋅F=∂Fx∂x+∂Fy∂y+∂Fz∂z\nabla \cdot \mathbf{F} = \dfrac{\partial F_x}{\partial x} + \dfrac{\partial F_y}{\partial y} + \dfrac{\partial F_z}{\partial z}, which is a scalar. A field with ∇⋅F=0\nabla \cdot \mathbf{F} = 0 everywhere is called solenoidal. An incompressible fluid's velocity and every magnetic field are solenoidal.

Now drop a tiny paddle wheel into the flow. If it spins, the flow has local rotation, and the curl ∇×F\nabla \times \mathbf{F} measures it. The curl is a vector found as a determinant with rows (i,j,k)(\mathbf{i}, \mathbf{j}, \mathbf{k}), (∂∂x,∂∂y,∂∂z)\left(\dfrac{\partial}{\partial x}, \dfrac{\partial}{\partial y}, \dfrac{\partial}{\partial z}\right) and (Fx,Fy,Fz)(F_x, F_y, F_z), and it points along the paddle's axis. A field with ∇×F=0\nabla \times \mathbf{F} = 0 is irrotational, and it can always be written as the gradient of a scalar potential, F=∇φ\mathbf{F} = \nabla\varphi.

A flow can have straight streamlines and still have curl. In a river that is fast at the top and slow near the bed, a paddle wheel spins because its top is pushed harder than its bottom.

Identities that GATE likes.

  • curl⁡(grad⁡φ)=0\operatorname{curl}(\operatorname{grad}\varphi) = 0 for any φ\varphi, so a gradient field never spins.
  • div⁡(curl⁡F)=0\operatorname{div}(\operatorname{curl}\mathbf{F}) = 0 for any F\mathbf{F}, so a curl field has no sources.
  • div⁡(grad⁡φ)=∇2φ=∂2φ∂x2+∂2φ∂y2+∂2φ∂z2\operatorname{div}(\operatorname{grad}\varphi) = \nabla^2\varphi = \dfrac{\partial^2 \varphi}{\partial x^2} + \dfrac{\partial^2 \varphi}{\partial y^2} + \dfrac{\partial^2 \varphi}{\partial z^2}, the Laplacian.
  • ∇⋅(φF)=φ ∇⋅F+F⋅∇φ\nabla \cdot (\varphi\mathbf{F}) = \varphi\,\nabla \cdot \mathbf{F} + \mathbf{F} \cdot \nabla\varphi.

Worked example. For F=(x2y, yz, xz2)\mathbf{F} = (x^2y,\ yz,\ xz^2), ∇⋅F=2xy+z+2xz\nabla \cdot \mathbf{F} = 2xy + z + 2xz. At (1,1,1)(1, 1, 1) this is 2+1+2=52 + 1 + 2 = 5, so there is a net outflow there.

Why it matters. Continuity in fluid mechanics is ∇⋅V=0\nabla \cdot \mathbf{V} = 0 for incompressible flow. Laplace's equation ∇2φ=0\nabla^2\varphi = 0 governs steady heat conduction, seepage under dams and electrostatic potential.

Line integrals and conservative fields

Push a trolley along a winding corridor. The work done is the sum of F⋅dr\mathbf{F} \cdot d\mathbf{r} over each small step, and that sum is the line integral ∫F⋅dr\int \mathbf{F} \cdot d\mathbf{r} along the path. To evaluate it, write the path in terms of one parameter tt, so that xx, yy and zz, and hence drd\mathbf{r}, depend on tt. Then integrate in tt from start to finish.

Some fields are special. If F\mathbf{F} is the gradient of a potential, F=∇φ\mathbf{F} = \nabla\varphi, the line integral depends only on where you start and end: ∫F⋅dr\int \mathbf{F} \cdot d\mathbf{r} = φ(end)−φ(start)\varphi(\text{end}) - \varphi(\text{start}). Such a field is conservative. Gravity and the electrostatic field are examples, which is why lifting a load costs the same energy whichever staircase you use.

There are three equal tests for a conservative field. F=∇φ\mathbf{F} = \nabla\varphi for some φ\varphi, ∇×F=0\nabla \times \mathbf{F} = 0 in a simply connected region, and ∮F⋅dr\oint \mathbf{F} \cdot d\mathbf{r} = 0 round every closed path. Friction is the classic non-conservative force, because walking round a loop and back still costs work.

Worked example. Take F=(2xy, x2)\mathbf{F} = (2xy,\ x^2) from (0,0)(0, 0) to (1,2)(1, 2). Here ∇×F\nabla \times \mathbf{F} has k\mathbf{k}-component 2x−2x=02x - 2x = 0, so F\mathbf{F} is conservative with φ=x2y\varphi = x^2y. The work is φ(1,2)−φ(0,0)=2\varphi(1, 2) - \varphi(0, 0) = 2, whatever the path.

Gauss, Stokes and Green: inside equals boundary

All three theorems share one idea. Whatever happens inside a region can be counted on its boundary, because inside contributions cancel in pairs.

Gauss divergence theorem. The outward flux through a closed surface equals the total divergence inside: ∮ ⁣ ⁣∮SF⋅n dS=∭V∇⋅F dV\oint\!\!\oint_S \mathbf{F} \cdot \mathbf{n}\,dS = \iiint_V \nabla \cdot \mathbf{F}\,dV. Think of a room full of tiny heaters; the heat leaving through the walls equals the sum of what every heater produces. In electromagnetism this becomes Gauss's law for charge.

Stokes' theorem. The circulation round a closed curve equals the total curl on any surface bounded by it: ∮CF⋅dr=∬S(∇×F)⋅n dS\oint_C \mathbf{F} \cdot d\mathbf{r} = \iint_S (\nabla \times \mathbf{F}) \cdot \mathbf{n}\,dS. Imagine the surface covered with tiny loops; neighbouring loops cancel along shared edges, so only the outer edge remains. In electromagnetism this gives Ampère's and Faraday's laws in integral form.

Green's theorem is Stokes' theorem flattened onto the xy-plane: ∮(M dx+N dy)=∬(∂N∂x−∂M∂y)dx dy\oint (M\,dx + N\,dy) = \iint \left(\dfrac{\partial N}{\partial x} - \dfrac{\partial M}{\partial y}\right)dx\,dy, with the curve traced anticlockwise. Choosing M=−y2M = -\dfrac{y}{2} and N=x2N = \dfrac{x}{2} gives the area enclosed as 12∮(x dy−y dx)\dfrac{1}{2}\oint (x\,dy - y\,dx). Planimeters, which measure areas on maps, work on this principle.

Worked example. For F=r=(x,y,z)\mathbf{F} = \mathbf{r} = (x, y, z), ∇⋅F\nabla \cdot \mathbf{F} = 3. So the outward flux through a sphere of radius aa is 3×43πa3=4πa33 \times \dfrac{4}{3}\pi a^3 = 4\pi a^3, with no surface integral needed.

Descriptive lens: how ESE and state papers ask this

Descriptive questions usually ask you to verify a theorem by working both sides, to show that a field is irrotational and find its potential, or to find a unit normal and a directional derivative together.

Our practice questions (not previous-year questions).

  1. Show that F=(y2+2xz, 2xy, x2)\mathbf{F} = (y^2 + 2xz,\ 2xy,\ x^2) is irrotational, find its scalar potential, and find the work done from (0,0,0)(0, 0, 0) to (1,1,1)(1, 1, 1).
  2. Verify Green's theorem for ∮[(x2−y) dx+x dy]\oint [(x^2 - y)\,dx + x\,dy] round the unit circle.
  3. Using the divergence theorem, find the outward flux of F=(x3,y3,z3)\mathbf{F} = (x^3, y^3, z^3) through the sphere x2+y2+z2=a2x^2 + y^2 + z^2 = a^2.

Answer plan for question 1.

  • First, compute ∇×F\nabla \times \mathbf{F} and show that each component is zero.
  • Next, find φ\varphi by integrating ∂φ∂x=y2+2xz\dfrac{\partial \varphi}{\partial x} = y^2 + 2xz in xx, then fixing the missing terms with the yy and zz components, to get φ=xy2+x2z\varphi = xy^2 + x^2z.
  • Finally, the work is φ(1,1,1)−φ(0,0,0)=2\varphi(1, 1, 1) - \varphi(0, 0, 0) = 2, which is independent of the path because the field is conservative.

Quick revision

  • A⋅B=∣A∣∣B∣cos⁡θ\mathbf{A} \cdot \mathbf{B} = \lvert \mathbf{A} \rvert \lvert \mathbf{B} \rvert \cos\theta is a scalar; A×B\mathbf{A} \times \mathbf{B} has size ∣A∣∣B∣sin⁡θ\lvert \mathbf{A} \rvert \lvert \mathbf{B} \rvert \sin\theta and is a vector perpendicular to both.
  • ∇φ\nabla\varphi points uphill fastest and is normal to φ=constant\varphi = \text{constant}; the directional derivative is ∇φ⋅a^\nabla\varphi \cdot \hat{\mathbf{a}}.
  • ∇⋅F\nabla \cdot \mathbf{F} is the net outflow (a scalar), and ∇⋅F=0\nabla \cdot \mathbf{F} = 0 means solenoidal.
  • ∇×F\nabla \times \mathbf{F} is the local spin (a vector), and ∇×F=0\nabla \times \mathbf{F} = 0 means irrotational, so F=∇φ\mathbf{F} = \nabla\varphi.
  • curl⁡(grad⁡φ)=0\operatorname{curl}(\operatorname{grad}\varphi) = 0 and div⁡(curl⁡F)=0\operatorname{div}(\operatorname{curl}\mathbf{F}) = 0 always hold, and div⁡(grad⁡φ)=∇2φ\operatorname{div}(\operatorname{grad}\varphi) = \nabla^2\varphi.
  • A conservative field's line integral depends only on the end points.
  • Gauss turns closed-surface flux into the volume integral of the divergence.
  • Stokes turns circulation into the surface integral of the curl, and Green is its plane form.
  • Area by Green's theorem is 12∮(x dy−y dx)\dfrac{1}{2}\oint (x\,dy - y\,dx), and ∇⋅r=3\nabla \cdot \mathbf{r} = 3.

Check yourself

Exam-style questions on this chapter. Pick an answer to see the explanation. 0 of 11 answered

  1. The cross product of two parallel vectors is:

  2. The gradient of a scalar field φ\varphi at a point is:

  3. For φ=x2+y2+z2\varphi = x^2 + y^2 + z^2, the greatest rate of increase at (1,2,2)(1, 2, 2) is:

  4. A vector field with zero divergence everywhere is called:

  5. For F=(x2y, yz, xz2)\mathbf{F} = (x^2y,\ yz,\ xz^2), ∇⋅F\nabla \cdot \mathbf{F} at (1,1,1)(1, 1, 1) is:

  6. For any smooth scalar field φ\varphi, curl⁡(grad⁡φ)\operatorname{curl}(\operatorname{grad}\varphi) equals:

  7. div⁡(grad⁡φ)\operatorname{div}(\operatorname{grad}\varphi) is called the:

  8. For a conservative field F\mathbf{F}, the line integral round any closed path is:

  9. Stokes' theorem relates a line integral round a closed curve to:

  10. The outward flux of F=(x,y,z)\mathbf{F} = (x, y, z) through a sphere of radius 2 is:

  11. By Green's theorem, 12∮(x dy−y dx)\dfrac{1}{2}\oint (x\,dy - y\,dx) round a closed curve gives:

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

Frequently asked questions

What does zero divergence mean?

The field is solenoidal: no net outflow, like an incompressible fluid.

What does zero curl mean?

The field is irrotational and can be written as the gradient of a scalar potential.

What is the curl of a gradient?

Always zero.

Which theorem converts a surface integral of curl into a line integral?

Stokes's theorem.

More in this module: Algebra and calculus for engineers

Official sources

Facts in this chapter were checked against these official sources.

  1. GATE 2026 syllabus ME, Section 1 Engineering Mathematics
  2. GATE 2026 syllabus EC, Section 1 Engineering Mathematics (Vector Analysis)
  3. NPTEL Engineering Mathematics - II (IIT Kharagpur, 111105134)