# left inverse is not equal to right inverse [duplicate]

Is it possible to have a function which has both left and right inverse but they are unequal ?

A left inverse means the function should be one-to-one whereas a right inverse means the function should be onto.

How can both of these conditions be valid simultaneously without being equal ?

-
possible duplicate of Right and left inverse, and math.stackexchange.com/questions/74363/… pretty much. –  rschwieb Aug 28 '13 at 18:46
@rschwieb please notice that the questions you posted are about linear algebra and here is the general case –  Dominic Michaelis Aug 28 '13 at 19:05
Dear @DominicMichaelis : The initial linked one has no relationship to linear algebra beyond the tag. I don't think your objection applies at all to the first one since the content is identical (and so is the answer.) What you say is true of the second one, though. –  rschwieb Aug 28 '13 at 19:22

## marked as duplicate by rschwieb, William, Shuhao Cao, Peter Taylor, TZakrevskiyAug 28 '13 at 19:38

Suppose that $f(g(x))=x$ and $h(f(x))=x$, then $h(x)=h(f(g(x))=g(x)$. So they have to be the same.

-

For functions they are equal whenever they exist. Let $f$ be a function with left inverse $g$ and right inverse $h$, then $$g=g\cdot id=g(fh)=(gf)h=h$$

-
(+1) There is something about your answer that I like :-) –  robjohn Aug 28 '13 at 18:40
@robjohn Then you will also enjoy this one –  rschwieb Aug 28 '13 at 19:22
If $f$ is a left inverse for $g$ and $h$ is a right inverse for $g$ (denote the identity function $\mathrm{id}(x)=x$) we have $f \circ g = \mathrm{id}$ and $g \circ h = \mathrm{id}$ so $f = f \circ \mathrm{id} = f \circ (g \circ h) = (f \circ g) \circ h = \mathrm{id} \circ h = h$. So $f=h$ is a double sided inverse.