The product of the slopes of the perpendicular lines = -1
If the slope of one is m, then the slope of the other is -1/m
The given equation is y = -2x - 1
The form of the equation is y = m x + b, where
m is the slope of the line
So the slope of the given line is m = -2
To find the slope of the perpendicular line reciprocal it and change its sign
The slope of the perpendicular line = 1/2
Substitute it in the form of the equation
y = 1/2 x + b
To find b substitute x and y of the equation by the coordinates of any point on the line
The line passes through point (2, -1), then
x = 2 and y = -1
-1 = 1/2 (2) + b
-1 = 1 + b
Subtract 1 from both sides to find b
-1 - 1 = 1 - 1 + b
-2 = b
The equation of the perpendicular line is
y = 1/2 x - 2