Both the equation and its inverse are functions.
A f(x) is a function if no value of x gives two values f(x)
We'll call the inverse of f(x) g(x). The inverse of a function f(x) is found by letting f(x)=y and switching the place of x and y.
f(x)=y=5x+1
switching x and y results in
x=5y+1
x-1=5y
x/5-1/5=y
g(x)=x/5-1/5
Both f(x) and g(x) are linear functions and I have given them in the form
y=mx+b. As long as m is finite, y=mx+b is a function. m is defined for both f(x) and it's inverse g(x).