is g=((1,1),(2,3),(3,5),(4,7))is a function from A=(1,2,3,4)to B==(1,3,5,7)?if this is given the formula g(x)=ax+b,then find a & b?

Is the domain of g equal to A? Is the range of g a subset of B? if both are true, then g maps A to B.