Mathematics for Chemistry/Plotting graphs

The properties of graphs
The most basic relationship between two variables $$x$$ and $$y$$ is a straight line, a linear relationship.

$$ y = {\rm m} x + {\rm c} $$

The variable $$m$$ is the gradient and $$c$$ is a constant which gives the intercept. The equations can be more complex than this including higher powers of $$x$$, such as

$$ y = {\rm a} x^2 + {\rm b} x + {\rm c} $$

This is called a quadratic equation and it follows a shape called a parabola. High powers of $$x$$ can occur giving cubic, quartic and quintic equations. In general, as the power is increased, the line mapping the variables wiggles more, often cutting the $$x$$-axis several times.

Practice
Plot $$x^2 - 1$$ between -3 and +2 in units of 1.

Plot $$x^2 + 3 x$$ between -4 and +1 in units of 1.

Plot $$2 x^3 -5 x^2 - 12 x$$ between -5 and +4 in units of 1.