I always forget this fact, so hopefully typing this out will help.
Let be a triangle with vertices , then there exists unique linear functions such that . This is the so called barycentric coordinates.
The fact here is that where is the length of the edge opposite vertex , and is the area of the triangle. The vector is the unit outward normal.
The derivation is simple. The direction of the gradient is towards the highest growth, and as the barycentric coordinates are linear functions, it’s clear that is the correct direction. The scaling is to simply note the area as where is the shortest distance from the edge to the vertex. This gives us the inverse of the slop as the barycentric coordinate has a value of 1 at the vertex.