A piecewise function is a [[function]] that has separate "pieces" depending on the input. The graph of a piecewise function is often, but not always, discontinuous.
$
f(x) =
\begin{cases}
x^2 & x <= 0 \\
x & x > 0
\end{cases}
$
## MathJax
The [[MathJax]] code to get the above result is displayed below.
```mathjax
$
f(x) =
\begin{cases}
x^2 & x <= 0 \\
x & x > 0
\end{cases}
$
```