Source: https://www.nointrigue.com/docs/notes/maths/maths_relfn.pdf