Let'sThe general equation of line is
y = mx + b
Where m is the slope and b is y-intercept.
Lets say,
The equation of the line a is
y1 = m1x1 + b1
line b:
y2 = m2x2 + b2
Now, both the lines are parallel if they have the same slope value, that is the difference of y values over x values.
If both lines are parallel.
m1 = m2 = m
Hence, the slope must be equal if the line a is parallel to line b.