Given $f(x)=ax-1$ and $g(x)=(x+1)/3$, if $f \circ g$ is identity then what is $a$? 
The function $f$ is given as $f(x)=ax-1$ and the function $g$ as $g(x)=(x+1)/3$.
If $(f \circ g)(x)$ is an identity function, what is the value of $a$? 

 A: I'm unsure about what your question is supposed to be, because I remember seeing a minus sign in there before the latest edit, i.e. $f(x) = ax-1$. 
If your question is indeed that (i.e. $f(x) = ax-1$) with all else being unchanged, then it has a solution. $fg(x) = a\frac{x+1}{3} -1 = x\frac a3 + \frac{a-3}{3}$, and this is identically equal to $x$, so by comparing coefficients, $\frac a3 = 1$ and $\frac{a-3}{3} = 0$ which both have the consistent solution $a=3$. This is crucial.
If, on the other hand, your question has $f(x) = ax+1$, then $fg(x) = a\frac{x+1}{3}+1 = x\frac a3 + \frac{a+3}{3}$. If this is identically set equal to $x$, we get $\frac a3 = 1$ and $\frac{a+3}{3} = 0$ which have no consistent common solution. So there is no answer in this case.
A: There was a misunderstanding.
Edit:
$$fog(x)= a\dfrac{x+1}{3}-1$$
Let,$$y(x)=fog(x)$$
So,now,for to be identity function,
$$y(x)=x$$
$$fog(x)=x$$
$$\implies a\dfrac{x+1}{3}-1= x$$
$$a=3$$
A: Since $$f(g(x))=x$$ for all $x$, it is true also for $x=0$:  $${1\over 3}a-1=f({1\over 3})=f(g(0))=0$$
So $a=3$.
