To find the equation of the line after it has been translated, we start with the original equation of the line:
\[ y = -x + 1. \]
-
Translate 1 unit to the right: Translating a line 1 unit to the right involves adding 1 to the x-value. Thus, we substitute \(x\) with \(x - 1\):
\[ y = -(x - 1) + 1. \] Simplifying this gives: \[ y = -x + 1 + 1 = -x + 2. \]
-
Translate 2 units up: To translate the line 2 units up, we add 2 to the entire equation:
\[ y = -x + 2 + 2. \] This simplifies to: \[ y = -x + 4. \]
Thus, the equation of the translated line is:
\[ \boxed{y = -x + 4}. \]