To tell if an equation has infinite solutions, the equation will be equal to each other.
For example,
x = x
x + 1 = x + 1
x - y = x - y
And so on...
And in special cases,
0x = 0
0x = 0(y + 1)
They have infinite solutions because there's no constant to determine the variable.