Do all straight lines have an inverse function? It would seem to make sense. All linear lines would pass the horizontal line test and thus when reflected across $y=x$ it would still be a function. However, the answers says no, and I cannot find a case where my logic doesn't work. Could I have some insight please.
[Math] Do all straight lines have an inverse function
functionsinverseinverse function
Best Answer
Characteristic for non-vertical "straight lines" is that they correspond with functions that can be prescribed by $x\mapsto ax+b$ where $a,b$ are fixed real numbers.
Based on equation $y=ax+b$ we can find an expression for $x$ in $y$ under the extra condition that $a\neq0$: $$x=\frac1{a}(y-b)$$By interchanging $x$ and $y$ we find the inverse function is:$$y=\frac1{a}(x-b)$$ This tells us that such linear functions have an inverse if $a\neq0$. In case $a=0$ we are dealing with a constant function prescribed by $x\mapsto b$. This function is not injective hence has no inverse.