Given that z1 and z2 are two complex numbers which are defined as followed:
z1 = a + bi
z2 = c + di
the two complex numbers are equal to each other if and only if the real and imaginary parts are equal.
In other words, if z1 = z2 we have:
a = c and b = d, where a, b, c and d are real numbers.