To find the equation of the line after it has been translated 1 unit to the right and 2 units up, we start with the original equation of the line:
\[ y = -x + 1 \]
Step 1: Translate the line 1 unit to the right
Translating a line 1 unit to the right involves replacing \(x\) with \(x - 1\) in the equation. The new equation becomes:
\[ y = -(x - 1) + 1 \]
Simplifying this gives:
\[ y = -x + 1 + 1 = -x + 2 \]
Step 2: Translate the line 2 units up
Now, we translate the line 2 units up. This involves adding 2 to the entire expression for \(y\). Thus, we have:
\[ y = -x + 2 + 2 \]
This simplifies to:
\[ y = -x + 4 \]
Conclusion
The equation of the translated line is:
\[ \boxed{y = -x + 4} \]