# How can I use a graph to write an algebraic function?

Feb 5, 2016

From the graph you should be able to determine some $\left(x , y\right)$ coordinates. Use these point to solve the general equation form for the constants.

#### Explanation:

The number of point you need will depend upon the shape of the graph: 2 sets for a linear graph; 3 sets for a parabola and so on.

Examples:

1. Linear Graph
graph{(y-(5x-3))(x^2+(y+3)^2-0.01)((x-1)^2+(y-2)^2-0.01)=0 [-5.15, 7.337, -4.03, 2.213]}
2 possible points that could be read from this graph:
$\textcolor{w h i t e}{\text{XXX}} \left(x , y\right) \in \left\{\begin{matrix}0 & - 3 \\ 1 & 2\end{matrix}\right\}$

General form of a linear equation (one version):
$\textcolor{w h i t e}{\text{XXX}} y = a x + b$

Using the points we read from the graph for $\left(x , y\right)$
$\textcolor{w h i t e}{\text{XXX}} - 3 = a \times \left(0\right) + b$
$\textcolor{w h i t e}{\text{XXX}} 2 = a \times \left(1\right) + b$
Two equations in two variables can be easily solved as :
$\textcolor{w h i t e}{\text{XXX}} b = - 3 \mathmr{and} a = 5$
So the equation can be written as
$\textcolor{w h i t e}{\text{XXX}} y = 5 x - 3$

2. Parabolic Graph
graph{(y-(3*x^2 -2x +4))((x-1)^2+(y-5)^2-0.01)((x+1)^2+(y-9)^2-0.01)(x^2+(y-4)^2-0.01)=0 [-4.23, 6.87, 3.568, 9.115]}
3 possible points that could be read from this graph:
$\textcolor{w h i t e}{\text{XXX}} \left(x , y\right) \in \left\{\begin{matrix}- 1 & 9 \\ 0 & 4 \\ 1 & 5\end{matrix}\right\}$

Using the general form for a parabola of:
$\textcolor{w h i t e}{\text{XXX}} y = a {x}^{2} + b x + c$

and the points we read from the graph:
$\textcolor{w h i t e}{\text{XXX}} 9 = a {\left(- 1\right)}^{2} + b \left(- 1\right) + c$
$\textcolor{w h i t e}{\text{XXX}} 4 = a {\left(0\right)}^{2} + b \left(0\right) + c$
$\textcolor{w h i t e}{\text{XXX}} 5 = a {\left(1\right)}^{2} + b \left(1\right) + c$
Again (without the details) we have 3 equations in 3 variables that can be solved as
$\textcolor{w h i t e}{\text{XXX}} a = 3 , b = \left(- 2\right) , c = 4$
So the equation can be written as
$\textcolor{w h i t e}{\text{XXX}} y = 3 {x}^{2} - 2 x + 4$

More complex polynomials will require more points but the process is identical.