Linear Function
Consider a function of the form y = a1x + a0 where a1 ≠ 0.
Two Points
If two distinct points (x1,y1) and (x2,y2) are known and x1 ≠ x2, then the coefficients are given by
![Coefficients of a line defined by two points](https://lynneslair.com/wp-content/uploads/2021/06/formulaeLinear2pt.png)
One Point and a Slope (Gradient)
If one point (x1,y1) is known, along with the slope (gradient) m, then the coefficients are given by
![Coefficients of a line defined by a point and a slope/gradient](https://lynneslair.com/wp-content/uploads/2021/06/formulaeLinear1pt.png)
Quadratic Function
Consider a function of the form y = a2x2 + a1x + a0 where a2 ≠ 0.
Three Points
If three distinct points (x1,y1), (x2,y2) and (x3,y3) are known and x1 ≠ x2 ≠ x3 ≠ x1, then the coefficients are given by
![Coefficients for a quadratic defined by three points](https://lynneslair.com/wp-content/uploads/2021/06/formulaeQuadratic3pt.png)
Two Points and a Slope (Gradient)
If two distinct points (x1,y1) and (x2,y2) are known with x1 ≠ x2, along with the slope z3 at x = x3 with x3 ≠ (x1 + x2)/2, then the coefficients are given by
![Coefficients of a quadratic defined by two points and the slope/gradient at a third point](https://lynneslair.com/wp-content/uploads/2021/06/formulaeQuadratic2pt.png)
One Point and Two Slopes (Gradients)
If one point (x1,y1) is known, along with the slopes z2 at x = x2 and z3 at x = x3 (x2 ≠ x3), then the coefficients are given by
![Coefficients of a quadratic defined by a point and the slopes/gradients at two other points](https://lynneslair.com/wp-content/uploads/2021/06/formulaeQuadratic1pt.png)