Which rule matches the function shown in the table

X. Y
-1. 1
1. -1
2. -2
Y=x+2
Y=x-2
Y=x-4
Y=-x

The rule that matches the function shown in the table is Y=x-2.