Vector Calculus: Understanding Divergence

Divergence (div) is “flux density”—the amount of flux entering or leaving a point. Think of it as the rate of flux expansion (positive divergence) or flux contraction (negative divergence). If you measure flux in bananas (and c’mon, who doesn’t?), a positive divergence means your location is a source of bananas. You’ve hit the Donkey Kong jackpot.

This is a companion discussion topic for the original entry at

i came across a piece of info saying that the equation of conitinuity comes from divergence theorem(i will give the statement here:“for any arbitrary region of volume v coverd by surface area s,the flux of the current density over the surface s is equal to the rate at which mass / charge leaves the volume v”)
is there a derivation for this…? …or could anyone tell me an intuitve approach…where i can atleast visualise what is happening?

Hi kirtika, I’d have to see some more on this, but I think in this context “flux of current density” means “change in current density”.

This statement may be saying the amount of current you see passing through a surface depends on the amount of charge leaving the region (a moving charge can induce a magnetic current for example). This is a bit tough to visualize, but as the charge moves the flux through the surface will change – imagine a firehose (constantly spitting out water) moving through an invisible sphere. As the hose goes along, the amount of water passing through will change.

would be nice if you could tell us something about Gauss & Stokes Thm! nice stuff btw!

Thanks – I actually have some stuff on Gauss and Stokes at my old site here:

Which I need to revise and update. But it’s on the list :slight_smile:


I wish to tell you a story.

As a young kid and in the high school I had few to no problems with math; it was easy to understand and the examples in the maths books were quite intuitive and visual.

What a shock it was to attend the first math courses in the university. I don’t know about the ones for math majors, but at least the math course materials for us engineering students were conjured from some fiery bowels of hell.

With no clarifying pictures and even less explanations (“divergence measures the change of vector function in its direction and the spreading of the direction. Now do the exam.” is pretty much all we get), the typical brute-force technique among tech students here is to memorize the ten or so calculations that the exam questions are picked from each year and vomit them on the test paper. Formula after formula. Equation, equation, equation.

Somebody just forgot to tell what the hell these formulas do and what they are used for anyway.

All this bitter rambling is here for a reason… I really wish to thank you for your explanations! This is the first time that instead of memorizing some stupid upside down triangles and strange-looking d’s with no comprehension of them whatsoever I really do understand, what the hell a “curl” actually is.

I am going to recommend your site to every tech and math student I know. Something like this is really missing from the teaching of mathematics and I don’t know whether the professors are too jaded, indifferent or too alienized from the real world to notice this.

In case you haven’t noticed, there are some neat animations of divergence and curl in

Once again… A big great thanks to you, Kalid! Keep up the good work!

Hi Jaakko, thanks for the comment – it’s something I would have written a few years ago! I had the same exact problem with regurgitating formulas in engineering classes, which motivated me to create this site. It really bothers me to know how without knowing “why” :).

Thanks for that link, the animations look really cool! Visualizing these concepts makes them so much clearer.

Again, appreciate the comment!

[…] Div, Grad, Flux and Curl (if you already know vector calculus) […]

hi nice post indeed. it clarified a lot of stuff regarding divergence. but tell me one small thing.
Is it possible when i consider an infinitesimal small volume from the actual volume, and the divergence might be flowing out in the infinitesimal volume but in the overall volume the divergence might be flowing in towards the volume?

Hi and also it would be extremely good if you can also tell something similar about the Tensors as well.

[…] Vector Calculus: Gradient, Flux, Divergence, Curl & Circulation […]

i whould like someone to explane me curl what is mean in simple or what is mean in fluid flow
simple example with a culculation number,iam intersted in but i need help ,regardes basheer

Thank you thank you thank you!!

I never thought understanding the divergence was this easy. I knew that it measured the amount of flux entering or leaving, but

Total flux change = (field change in X direction) + (field change in Y direction) + (field change in Z direction)

really hit the spot! I even understand that enigmatic equation now! I really can’t believe why nobody teaches these things. (I always assumed that these were so intricate concepts that us lesser mortals with small brains couldn’t understand them)

Keep going mate. You are the man.

@This: Thanks, really glad it helped! That equation made things click for me too. I’ve come to realize that the vast majority of math ideas are all within our grasp if presented in the right light :).

Very nice site. If I understand you correcly you mean that the div is the flux density.

You state: "So, divergence is just the net flux per unit volume, or “flux density”, just like regular density is mass per unit volume (of course, we don’t know about “negative” density).

The bigger the flux density (positive or negative), the stronger the flux source or sink. A div of zero means there’s no net flux change in side the region. In plain english:

Divergence = Flux / Volume"

In terms of magnetic fields, does this mean that if the magnetic flux density is zero the change in magnetic flux is zero inside a volume?

In case the magnetic flux is larger than zero, does this mean that the change in magnetic flux inside a volume is finite (that there is a change of magnetic flux inside that volume). In case where does that change in magnetic flux come from?

I have read in the litterature that the flux density inside a transformer core material does change caused by VOLTAGE changes over time, NOT from the magnitude of current: I don’t understand why. How can voltage changes cause the field lines to change direction inside the magnetic material (or is that wrongly understood). Can someone explain magnetic flux density and possibly relate it to flux density as it is explained here.

Hi again. Sorry to “spam you”. Over at they mention that “Divergence measures expansion or compression of a vector field. We ended that section with the example where we immersed a sphere into a vector field that had positive divergence everyone. No matter where one moves the sphere (with the sliders), more fluid flows out of the sphere than into the sphere, indicating the fluid is expanding.”

Let us say that instead of fluid, we talk about magnetic flux. Does that mean that with a positive magnetic flux density (divergence), the flux lines are expanding. Does that mean that the magnetic field is changing in strength.

How can a magnetic field that changes in strength induce a voltage in a wire running thru the magnetic field?

rosetta stone spanish with its language learning assistant tools and bold guarantee is a very unique program which teaches you all kinds of rosetta stone language and skills. First, it leads you to an area rosetta stone on sale where you may get to know the cheap rosetta stone vocabulary and commonly-used structures so that you may capture the confidence to proceed. After this primary period, it will tell you some how to know your rosetta stone online as well as how to involve yourself in really daily life.

[…] was a long article. Take a break. Take a shower. Get outside. See your family. Or, read on about divergence. It's your call. 29 Comments Posted September 16, 2006, under Vector Calculus Tags: Related […]

You suggest intuition:

"Remember that by convention, flux is positive when it leaves a closed surface. Imagine you were your normal self, and could talk to points inside a vector field, asking what they saw:

* If the point saw flux entering, he’d scream that everything was closing in on him. This is a negative divergence, and the point is capturing flux, like water going down a sink.
* If the point saw flux leaving, he’d sniff his armpits and say all flux was existing. This is a positive divergence, and the point is a source of flux, like a hose."

And it seems to be wrong. It suggests that when there is a closed surface, and the vector field that “crosses” the surface, then there will be places (points), where divergence is negative (flux entering) and other places where divergence is positive (flux entering).

Now take a look at this pages: (where an example with sphere is introduced), and (where it is further explained).
It shows the simple case, where divergence is positive everywhere in the domain - outside, inside, and on the boundary of the surface.
This also holds, when sphere is moved away from origin so flux is entering the sphere in some places, not only leaving (as is the case when sphere is centered at origin).

Long story short, as far as I understand all of this, this contradicts your intuition that whenever flux is entering the the closed surface, divergence is negative.