Given an arbitrary line with gradient m, that passes through a point (x1, y1)
The equation of the line is
y - y1 = m( x - x1)
To shift the line up by g units
Then, the new equation becomes
y - y1 + g = m(x - x1)
To shift the line down by g units
Then, the new equation becomes
y - y1 - g = m(x - x1)
Taking the axis of reflection as x = 0
The reflection of the line is
-y - y1 = m( x - x1)
Taking the axis of reflection as y = 0
The reflection of the line is
y - y1 = m( -x - x1)