Need help findind function such as $f(a) = c$ and $f(c) = a$ I haven't practiced algebra for ages and it seems I have issues with basic algebraic problem. So I need to find a function such as $f(a) = c$ and $f(c) = a$
As I understand we can do it with the function of a line. E.g
$$ c = ma + b$$ 
$$ a = mc + b$$
But now I am confused on what to do next. I need to solve for $m$ and $b$ right?
$$c - a = ma - mc$$
$$c - a = m(a - c)$$
$$m = \frac{c - a}{a - c}$$
And then $b$
$$c = \frac{c - a}{a - c} \times a + b$$
$$b = c - \frac{c - a}{a - c} \times a$$
And now I am stuck. What should I do next?

This problem is solvable without any fancy algebra. Is there something wrong with
$$f(x)=a+c-x$$
or perhaps, if $a$ and $c$ are non-zero,
$$f(x)=\frac{ac}x$$
?

Here's one way to find a suitable linear function with algebra:
Substituting the expression for $c$ in $c=ma+b$ into the equation $a=mc+b$ we get
$$\begin{align}
a &= m(ma+b)+b \\
a &= m^2a+mb+b \\
0 &= (m^2-1)a+(m+1)b
\end{align}$$
Remember that $a$ is the unknown variable here, so the right-hand side is a polynomial in $a$. For that equation to hold for all $a$, the coefficients must be zero and we must have
$$m^2-1=0 \qquad\text{and}\qquad (m+1)b=0$$
Solving the first gives $m=\pm 1$. If $m=1$ then the second gives $b=0$, so the function is $f(x)=x$. This does not work and is an extraneous solution.
If $m=-1$ then any $b$ will satisfy the second. We get the function $f(x)=-x+b$, and substituting $x=a,f(a)=c$ or $x=c,f(c)=a$ shows that $b=a+c$, giving us the final answer

$$f(x)=-x+a+c$$

which is the same solution I gave earlier.
