In the linear function given by the equation \( y = -x + 2 \), the slope is represented by the coefficient of \( x \).
Here, the equation can be rewritten in the slope-intercept form \( y = mx + b \), where \( m \) is the slope and \( b \) is the y-intercept.
From the equation \( y = -x + 2 \), we can identify:
- The slope \( m = -1 \)
- The y-intercept \( b = 2 \)
Thus, the slope of the linear function \( y = -x + 2 \) is \(-1\).