What does it mean if the dot product of two vectors is negative? If the dot product gives only magnitude, then how can it be negative?
For example, in this calculation:
$$W = \vec{F}\cdot\vec{r} = Fr\cos\theta = (12\ \mathrm{N})(2.0\ \mathrm{m})(\cos 180^\circ) = -24\ \mathrm{N\,m} = -24\ \mathrm{J}$$
Why is there a negative sign? What does it tell us?
 A: $$W = \vec{F}\cdot\vec{r} = Fr\cos\theta$$
So this is negative when $\frac{\pi}{2}<\theta<\frac{3\pi}{2}$.
It's telling you that the two vectors are pointing in more or less the opposite direction. Or more precisely, if you projected $\vec{F}$ onto $\vec{r}$, the projection would be in the opposite direction from $\vec{r}$ (or vice versa).
A: The formula you have supplied in your question says it all:
$$\vec F\cdot \vec r=Frcos(\theta)$$
$F$ and $r$ are both positive (vector magnitudes), and so the negative sign comes from $cos(\theta)$
$\theta$ is the angle between the vectors, and $cos(\theta)$ is negative when $\frac {\pi}{2}<\theta<\frac{3\pi}{2}$. This means the two vectors are facing in "opposite directions" (of course not exactly opposite, hence the quotes).
You can think of the dot product as how aligned two vectors are. Its maximum absolute value is just the product of the magnitudes, and the sign indicates if they are facing relatively in the same (positive) or opposite (negative) direction.
A: A dot product between two vectors is their parallel components multiplied. So,


*

*if both parallel components point the same way, then they have the same sign and give a positive dot product, while

*if one of those parallel components points opposite to the other, then their signs are different and the dot product becomes negative.


In your specific example of work, a negative $W$ thus means that the force and the displacement are opposite. Clearly this means that that force is not helping but rather counteracting this displacement. For example by slowing down the motion. So this force ducks energy out of the system rather than adding energy to the system. Therefore the negative sign makes sense. 
A: In your function:
$$W = \vec{F}\cdot\vec{r} = Fr\cos\theta $$
Let's assume that 
$$\vec{r}>0$$
There are three cases:


*

*the dot product is 0, this means that the two vectors are perpendicular

*the dot product is >0, this means that the two vectors point approximately in the same direction, that is, their angle is < 90 degrees

*the dot product is <0, this means that the two vectors point in approximately opposite direction, that is their angle is > 90 degrees
A: Your confusion might about negative work done might have arisen because the magnitude of a vector is always positive but as work done is a scalar quantity it can be either positive or negative.
You will be familiar with ordinary multiplication and perhaps were taught multiplication via a (real) number line which is drawn at the top of the diagram below.  

On the number line you have positive numbers, negative numbers and zero.
Negative numbers are conceptually more difficult to deal with than positive numbers.
The meaning of $3$ oranges is "obvious" but the meaning of $-3$ oranges is perhaps less so.
$+3$ oranges might mean adding $3$ oranges to a box of oranges and $-2$ would then mean taking $2$ oranges from the box.
You could use this number line in the context of energy where $+3$ joules means adding $3$ joules of energy to a system and $-2$ joules means taking $2$ joules of energy from the system.  
In the context of work done then $+3$ joules is the work done by a force and $-2$ joules is the work done on the force.  
When you multiply you are really scaling so $3 \times 2$ means take the number $3$ and scale in by a factor $2$ ie double it.
It could also mean take the number $2$ and scale it by a factor $3$ ie triple it.
Either way to get the number $+6$.
From this you can build up the rule for multiplying numbers whose signs are the same (result is a positive number) and for multiplying numbers whose signs are different (result is a negative number).  
The definition of work done comes from a multiplication (dot product) of two vectors force $\vec F$ and displacement $\vec S$.  
In one dimension the multiplication is straight forward to apply.
If the force is $3$ newtons in a particular direct and the displacement is $2$ metres in the same direction gives the work done as $+6$ joule which is interpreted as the work done by the force.
However, if the force is $3$ newtons in a particular direct and the displacement is $2$ metres in the opposite direction this gives the work done as $-6$ joule which is interpreted as the work done on the force.  
In vector notation this can be written as $3\hat x \cdot 2 \hat x = (3 \times 2) (\hat x \cdot \hat x) = 6$.
In which there is an ordinary multiplication (scaling) and a dot product, $\hat x \cdot \hat x= 1$
From the definition of work done a force in one direction and a displacement in the opposite direction will yield a negative value.
With $\vec F = 3 \hat x$ and $\vec S = -2 \hat x$ (the displacement has a component of $-2$ in the $\hat x$ direction) you get
 $3\hat x \cdot 2 (-\hat x) = 3\hat x \cdot -2 (\hat x) =(3 \times -2) (\hat x \cdot \hat x) = -6$ and this is interpreted as the work done on the force.  
The introduction of the dot product enables one to more easily multiply in dimensions greater than one.  

Suppose that the force is $\vec F = F \hat f = 3 \hat x + 4\hat y$ where $\hat f = \frac 15 (3 \hat x + 5\hat y)$ and the displacement is $\vec S = S \hat s = 3 \hat x +-4\hat y$ where $\hat s = \frac 15 (3 \hat x +- 4\hat y)$
The work done by the force = $\vec F \cdot \vec S = (3 \hat x + 4\hat y) \cdot (3 \hat x - 4\hat y) = (3\times 3) (\hat x \cdot \hat x) + (4\times -4) (\hat y \cdot \hat y) = 9 – 16 = -7$ joules.
The force and the displacement have been each been split up into two components and then the work done along each of the two directions has been evaluated and the total work done evaluated as the sum of the work done in each direction.
So the dot product allows you to multiply (scale) in two directions.  
The dot product also enables you to simplify such a multiplication even more because $\vec F \cdot \vec S = FS \cos \theta$ where $\theta$ is the angle between the directions of the two vectors.
This equation can be interpreted as $ F\,(S \cos \theta)$ where $S\cos \theta$ is the projection of $\vec S$ onto the direction of $\vec F$ or as $ S\, (F \cos \theta)$ where $F\cos \theta$ is the projection of $\vec F$ onto the direction of $\vec S$
In the example $\theta = 106^\circ$ and so the work done is $5 \times 5 \cos 106^\circ = -7$ joules as before.
