TLDNR: math.h is not a part of the standard C library, so you have to link to it!
-llibrary searches the library library while linking. The m stands for libm, the library that contains <math.h>. For more information, see these couple links.
@luantkow’s answer is really good but long! Here’s a short version if you don’t want to read! ¯\_(ツ)_/¯