If $f,g : \mathbb{R} \to \mathbb{R}$, how is max{$f$,$g$} defined? I am currently reading a textbook on metric spaces and came across the following terminology for two functions I can't seem to find anywhere how it is defined.
Let $f,g : \mathbb{R} \to \mathbb{R}$, how is max{$f$,$g$} defined? similarly, how is min{$f,g$} defined?

I am thinking for max{$f$,$g$}: this means simply to take the maximum values of $f$ and $g$ and max{$f$,$g$} consists of all those values. Similarly, to take the minimum values of $f$ and $g$ and min{$f,g$} consists of all those values.

The motivation for this is, I came across a problem where it asked: given two metrics $d_1$ and $d_2$ (for $(X_1,d_1)$ and $(X_2,d_2)$ respectively) is max{$d_1$,$d_2$} a metric on $X_1 \times X_2$? However, to begin to answer this question, I need to define the terminology I am unfamiliar with.
 A: For each fixed $x$, $\max\{f(x),g(x)\}$ is the largest number between the two real numbers $f(x)$ and $g(x)$. Defining $\varphi(x)=\max\{f,g\}(x)=\max\{f(x),g(x)\}$ it is possible to prove that $ \varphi(x)=\frac{1}{2}[f(x)+g(x)+|f(x)-g(x)|]$.
A: This follows the usual pattern for function arithmetic.

*

*$f+g$ is the function $x \mapsto f(x) + g(x)$.

*$f-g$ is the function $x \mapsto f(x) - g(x)$.

*$f\cdot g$ is the function $x \mapsto f(x) \cdot g(x)$.

*$f/g$ is the function $x \mapsto f(x) / g(x)$.

*$\max\{f,g\}$ is the function $x \mapsto \max \{f(x), g(x)\}$.

That is, function expressions bind all domain variable slots to a single domain slot.
A: It is defined as one would expect. Keep in mind that you have functions $f,g: \mathbb{R}\to\mathbb{R}$
When you evaluate both functions at $x$ you get a real number. So you can take $\max\{f(x),g(x)\}$, and there is not special definition needed, because everything happens on the reals, and I am sure you have defined the maximum.
Also keep in mind that $\max(x,y)=\min(-x,-y)$, so you sort of do not need a second definition.
And the maximum of two reals is defined as:
$\max(x,y)=\begin{cases}x,~\text{if}\quad y\leq x\\ y~~~\text{else}\end{cases}$
A: As many other answers show, $\max\{f,g\}$ is defined pointwise.
For the problem that motivates you, find an answer at this question: Maximum of two metrics is a metric
A: Given two functions $f,g: X\subset \mathbb{R}\to \mathbb{R}$, we can define the maximum $\max(f,g):X\to \mathbb{R}$ by $$\max(f,g)(x):=\max(f(x),g(x)),$$and their minimum $\min(f,g)(x):X\to \mathbb{R}$ by $$\min(f,g)(x):=\min(f(x),g(x)).$$
