How can one recognise the beat frequency from a graph?

Why is the beat frequency equal to the difference of the frequency of the two waves?