The function \( f(x) = |x - 1| \) can be written as:
\[
f(x) =
\begin{cases}
x - 1 & \text{if } x \geq 1,
1 - x & \text{if } x<1.
\end{cases}
\]
To check continuity at \( x = 1 \), we evaluate:
1. \( f(1) = |1 - 1| = 0. \)
2. Left-hand limit (\( \lim_{x \to 1^-} f(x) \)):
\[
\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} (1 - x) = 0.
\]
3. Right-hand limit (\( \lim_{x \to 1^+} f(x) \)):
\[
\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (x - 1) = 0.
\]
Since \( f(1) = \lim_{x \to 1^-} f(x) = \lim_{x \to 1^+} f(x) \), the function is continuous at \( x = 1 \).