[Math] Finding the inverse of a mapping that can be defined as a function on a specific domain

algebra-precalculuselementary-set-theoryinverse

Let $A = \{x \in \mathbb R\mid x\geq2\}$ and $B = \{x \in \mathbb R\mid x\geq1\}$ and the
function $f : A\rightarrow B$ is defined by $f(x) = x^2-4x+5$.

With this domain and codomain, the function is surjective and injective as well. Because this function is bijective an inverse can be taken, which I got to be $2+\sqrt{x-1}$ and $2-\sqrt{x-1}$. $2 + \sqrt{x-1}$ would be the inverse, but my question is that can you redefine the inverse to satisfy the conditions of the domain and codomain by just stating the inverse is $2 + \sqrt{x-1}$?

Best Answer

Note $f(x) = (x - 2)^2 + 1$. The function $g : B \to A$ given by $g(x) = 2 + \sqrt{x - 1}$ is the inverse of $f$ since $$g(f(x)) = 2 + \sqrt{f(x) - 1} = 2 + \sqrt{(x - 2)^2} = 2 + (x - 2) = x$$ and $$f(g(x)) = (g(x) - 2)^2 + 1 = (\sqrt{x - 1})^2 + 1 = (x - 1) + 1 = x$$