# One to one and onto in composite function

## Homework Statement

I just want to make sure that I am correct. if we have a composite function f(g(x)).

## Homework Equations

f(g(x)) is onto if and only if both f(x) and g(x) are onto
f(g(x)) is one to one if and only if or both f(x) and g(x) are one to one

## The Attempt at a Solution

when I try to make f(x) is onto, but not one to one. And g(x) is one to one but not onto, f(g(x)) is not onto

For example, let $f: \mathbb R \to \mathbb R^2$ by $f(x) = (x,0)$ and $g: \mathbb R^2 \to \mathbb R$ be $g(x,y) = x+y$. f is one-to-one but g is not one-to-one. However, the function g(f(x)) = x is just the identity function and is injective.