The function gf is defined only if R

The function fg is defined only if R

Domain of gf = domain of f.

Domain of fg = domain of g.

To find range of gf, apply the range of f as domain on the graph of g.

To find range of fg, apply the range of g as domain on the graph of f.