Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am studying about forces as vectors. And they give me this equation:
$c^2 = a^2 + b^2 - 2ab \cos C$

Can anybody explain me the second part of the equation? I perfectly understand $c^2 = a^2 + b^2$ but what's with the $-2ab \,\mathrm{cos}\, C$?

share|cite|improve this question
Usage of this formula is needed when the basis of vector field is not orthogonal. Karthesian one ([1,0];[0,1]) is orthonormal, so you can use Pythagorean theorem, but in basis of [1,0];[1,1] you have to use law of cosines. – Crowley Jun 16 '11 at 7:05
up vote 4 down vote accepted

This is the law of cosines! The Pythagorean theorem is just a special case of this more general result - in the Pythagorean theorem we are dealing with a right triangle only, and $C=90$ degrees. This equation is true in the more general case of any triangle.

share|cite|improve this answer
oh! i see! so the "c^2 = a^2 + b^2" is just a shorthand when its cosine is equal to 90, because cos 90 = 0. – Daniel Pendergast Jun 15 '11 at 17:58
Well, not exactly ANY triangle, because there is Spherical triangle. ;) But when talking about planar geometry, yes, you are completely right. – Crowley Jun 16 '11 at 7:01

Thanks for the question. You can derive this equation from the Pythagorean equation which is only for the the case when the two lines a and b are perpendicular to each other. But if they are at an angle then this is the general equation. enter image description here

Now from the picture $$ \begin{align} c^2&=(a+b \cos \alpha)^2 + (b \sin \alpha)^2\\ & = a^2 + 2ab \cos \alpha + b^2(\cos^2 \alpha + \sin^2 \alpha)\\ & = a^2 + b^2 + 2ab \cos \alpha \end{align} $$

Now cos alpha can be written as; $$ cos (180 - C) = -cos C $$ Thus the equation becomes $$ c^2 = a^2 + b^2 - 2ab cos C $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.