# Mathematics for Chemistry/Plotting graphs

## The properties of graphs

The most basic relationship between two variables ${\displaystyle x}$  and ${\displaystyle y}$  is a straight line, a linear relationship.

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

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

${\displaystyle 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 ${\displaystyle 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 ${\displaystyle x}$ -axis several times.

### Practice

Plot ${\displaystyle x^{2}-1}$  between -3 and +2 in units of 1.

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

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