f[x_] := a*x + b

f[1]

a = 1
b = 0
f[1]

f[2]

b = -3
f[0]

f[1]

a = 1
b = -3
Plot[f[x], {x, -2, 5}, PlotRange->{-5, 2}]

a = 1/2
b = -2
Plot[f[x], {x, -2, 5}, PlotRange->{-5, 2}]

g[x_] = c*x^2

h[x] = d*x^3

data = Rest[Import["http://pmaweb.caltech.edu/~phy003/labs/Data1.txt", "Table"]]

lsq=Fit[data,{1,x},x]

Show[ListPlot[data], Plot[lsq, {x, 0, 10}]]

lsq2 = LinearModelFit[data, {1, x}, x]

Show[ListPlot[data], Plot[lsq2[x], {x, 0, 10}]]