Given that a straight line passes through the point P (- 2,2) and forms a triangle of area 1 with two coordinate axes, the equation of the straight line is solved? More detailed process! Thank you!

Given that a straight line passes through the point P (- 2,2) and forms a triangle of area 1 with two coordinate axes, the equation of the straight line is solved? More detailed process! Thank you!

Let the slope of the line be K and there is a line passing through the point (- 2,2), then the equation of the line is y = KX + 2 (K + 1)
When x = 0, y = 2 (K + 1). When y = 0, x = - 2 (K + 1) / K
S=1/2*x*y=-1/2*2(k+1)*2(k+1)/k=1
The solution is k = - 1 / 2 or K = - 2
So the equation of the line is y = - 1 / 2 + 1, or y = - 2x-2