The function f is defined by f(x)=ax+b, where a and b are constants. If f(3)=1 and f(x)=7 when x=−1, what is the value of a?
-2
-3/2
3/2
2