If a.b.c,d are rationals and x is irrational number, then prove that $\frac{ax+b}{cx+d}$ is usually a irrational number. When do exceptions occur? If a.b.c,d are rationals and x is irrational number, then prove that $\frac{ax+b}{cx+d}$ is usually a irrational number. When do exceptions occur?
This is a homework Question. i did this by assuming that given fraction is rational say $\frac{p}{q}$. Now i write $$\frac{ax+b}{cx+d} = \frac{p}{q}$$. After cross multiplying i get 
$$\frac{qb-pd}{pc-qa}=x$$
So this contradiction as right hand side is rational and left hand side is irrational.
Now the question asks where does exceptions occur. I see that exceptions can occur when $a=c=0$ and $a=b=c=d$. But what are other exceptions and is my working method correct?
Thanks

The criterion is the following: If $ad-bc\ne0$ and $x\notin{\mathbb Q}$ then $$y:={ax+b\over cx+d}$$ is irrational as well, but if $ad-bc=0$ then $y$ is rational, or undefined.
Proof. Assume $c\ne0$. Then $cx+d$ is irrational, hence $\ne0$, and we may write
$$y={a\over c}-{ad-bc\over c(cx+d)}\ .$$
If $ad-bc\ne0$ then the last fraction, and therewith $y$, is irrational. If $ad-bc=0$ then $y={a\over c}$ is rational.
The case $c=0$ is even simpler: If $d=0$ as well then $y$ is undefined. If $d\ne0$ then $ad-bc\ne0$ means $a\ne0$. Therefore
$$y={a\over d}x+{b\over d}$$
is irrational if $ad-bc\ne0$, and is $={b\over d}$, if $ad-bc=0$.
