Source: https://www3.nd.edu/~apilking/Precalculus/Lectures/Lecture%2011%20Graphs%20of%20Functions.pdf