Let us consider two parallel lines A and B with the slope m. Both of them have the same slope because parallel lines have the same slope.

Now, let the coordinates of A be from (x1,y1) to (x2,y2) and let the coordinates of B be from (x3,y3) to (x4,y4).

Now we know that

We will use the above two equations later.

Now we just have to prove that the difference is slope remains zero after transformation. Let us assume we have a transformation matrix as shown below:

And now, let us apply this transformation matrix to our points (x1,y1), (x2,y2), (x3,y3), (x4,y4).

Now, let us calculate the slopes of the transformed line. Slope of the first line, p, is given as:

And now we can calculate the slope of the second line, q, as:

Now, we can substitute the values of y4-y3 and y2-y1 we derived earlier in these equations.

Since the slopes of the lines are same after transformation, we can say that they are parallel. Such type of transformations are also called affine transformations.

well explained