Two lines are parallel if they have the same slope, and they are perpendicular if the slope of one is the negative of the reciprocal of the other.
The slope m_1 of the line AB is

And the slope m_2 of the line CD is

The slopes m_1 and m_2 are negative reciprocals of each other, meaning if you take the reciprocal of m_1 and then multiply it by -1, you will get m_2.
Hence, the lines are perpendicular.