Given a line passing through point P (- 2,2), and the area of triangle formed by two coordinate axes is 1, the equation of the line is obtained

Given a line passing through point P (- 2,2), and the area of triangle formed by two coordinate axes is 1, the equation of the line is obtained

It's to find his analytic function
Let y = KX + B,
When y = 0, x = - B / K, then the intersection coordinate of X axis is (- B / K, 0)
When x = and y = B, then the intersection coordinates of Y axis are (0, b)
The area of s triangle is 1 / 2 * | B / k * | B = 1
b^2=2*|k|,
On the other hand, the point P (- 2,2) on the line y = KX + B has
2=-2K+b,
b=2(1+k),
[2(1+k)]^2=2*|k|,
2K ^ 2 + 3K + 2 = 0, (inconsistent, rounding),
Or 2K ^ 2 + 5K + 2 = 0
K1=-1/2,K2=2.
b1=1,b2=6.
The equation of this line is: y = - 1 / 2x + 1, or y = 2x + 6