The radius of a circle inscribed in a triangle is r = K/s, where K is the area of the triangle, and s is the semiperimeter of the triangle.
The area, K, of triangle ABC is the sum of three smaller triangles AOC, COB, and BOA.
The area of AOC is (1/2)br.
The area of COB is (1/2)ar.
The area of BOA is (1/2)cr.
So K = (1/2)(a+b+c)(r) = sr.
If the vertices of the triangle are given on the coordinate plane, then the incenter is the weighted average of the vertices, where the weights are the lengths of the opposite sides. In the diagram, above, O is (Bb+Cc+Aa)/(a+b+c), where O, A, B, and C are vectors, and the side lengths a, b, and c are scalars. This should make sense, because each bisector meets the opposite side at a point weighted by the lengths of the two adjacent sides. (The angle bisector theorem).
More about inscribed and excribed circles, and in particular: the Angle Bisector Theorem
Summary of geometrical theorems
The webmaster and author of this Math Help site is Graeme McRae.