How is $0\cdot\infty= -1$? It is known that the product of slopes of two perpendicular lines is equal to $-1$ ($m_1*m_2=-1$ for $m_1$ and $m_2$ being the slopes of the perpendicular lines $l_1$ and $l_2$). The slope of $x$-axis $=0$; the slope of $y$-axis$=$ undefined (or $\infty$); $x$-axis and $y$-axis are perpendicular to each other. So, it must mean that the product of their slopes (i.e. $0$ and $\infty$) must be equal to $-1$. How is $0*\infty=-1$? Is it really?
 A: More generally, if we have two lines $A_1x+B_1y+C_1=0$ and $A_2x+B_2y+C_2=0,$ then they are perpendicular if and only if $$A_1A_2=-B_1B_2.$$ Now, if neither line is vertical or horizontal (that is, the $A_i$s and $B_i$s are non-zero), then we can divide by $B_1B_2$ and obtain the result that the product of their slopes is $-1.$ But if, say, $B_1=0$ (so that $A_1\ne0$), then in order for them to be perpendicular, we need $A_2=0$ (and so $B_2\ne 0$). In such a case, we can talk about the slope of the latter line (it's $0$), but not the former (don't ever try to divide by $0$), so talking about the "product of their slopes" is nonsensical.
A: 
How is $0*\infty=-1$? Is it really?

No, $0$ times $\infty$ is not equal to $-1$. In fact, the product isn't even defined. It is not a question of this somehow giving a contradiction, it just isn't defined.
The rule you are referring to says that: Given two lines with slopes $m_1$ and $m_2$ (real numbers) then
the lines are perpendicular if and only if their product is $-1$.
So, it is part of the assumption in the rule that the slopes be real numbers, and $\infty$ is not a real number.
A: As noted in other answers the slope of a vertical line is not defined, so simply we can not speak of the product of the two slopes of the $x$ and the $y$ axis.
If you want you can accord the fact that these two lines are orthogonal with the general rule $m m'=-1$ using a limit. 
Take a line $y=mx$ amd a perpendicular line $y=m'x=-\dfrac{1}{m}x$, than the first line become the $x$ axis if $m \rightarrow 0$ and we find:
$$
\lim _{m\rightarrow 0} m m'=\lim _{m\rightarrow 0} m(-\dfrac{1}{m})=-1
$$
A: You can think as a limit. $\lim_{m_1\to \infty} m_2=0$ for $m_1\cdot m_2=-1$. But it's not proper to say $0\cdot \infty=-1$ because you get
$$0\cdot \infty=-1$$
$$a\cdot(0\cdot \infty)=a\cdot(-1)$$
$$(a\cdot0)\cdot \infty=a\cdot(-1)$$
$$-1=0\cdot \infty=-a$$
for any $a\in \mathbb{R}$.
