So,we know that $(2)^2=4$ and also $(-2)^2=4.$
Thus, $(2)^2=(-2)^2$
Now,take square root on both sides,
So, $\sqrt{(2)^2}=\sqrt{(-2)^2}$
Hence, $2=-2$
As you can see I am getting something impossible.
Please tell me why this is happening?
So,we know that $(2)^2=4$ and also $(-2)^2=4.$
Thus, $(2)^2=(-2)^2$
Now,take square root on both sides,
So, $\sqrt{(2)^2}=\sqrt{(-2)^2}$
Hence, $2=-2$
As you can see I am getting something impossible.
Please tell me why this is happening?
On
You must define what you mean by the square root.
It is usually understood to mean a function $\sqrt{\cdot}\,:[0,+\infty)\longrightarrow[0,+\infty)$, meaning it's only defined on nonnegative real numbers, and its result is always a nonnegative real number. In other words, we always take the positive square root: $\sqrt{a^2}=|a|$, which is not necessarily $a$. In your case, we would have $\sqrt{{(-2)}^2}=|-2|=2$.
In other contexts (for instance, complex analysis), one generally understands that square roots (and other $n$-th roots) are multivalued functions: any nonzero complex number has $n$ distinct $n$-th roots. In this context, we don't say that '$2$ is the square root of $4$', but rather that '$2$ is a square root of $4$', the other being (as you yourself have noticed) $-2$.
On
You have discovered that $\sqrt{a^2}$ is not always the same as $a$.
There are a large number of cases where $\sqrt{a^2}$ is the same as $a$, namely whenever $a$ is a positive number.
But in your computation you're trying to rewrite $\sqrt{(-2)^2}$ to $-2$, and those two are not the same thing. To the contrary, since $(-2)^2=4$, $\sqrt{(-2)^2}$ must be the same as $\sqrt 4$, which is $2$. The square root of something does not depend on how that something was created, only on what it is, and $4$ is $4$ no matter how you get it by squaring $2$ or squaring $-2$.
On
This comes from the fact that the squaring function is not injective, which means that two numbers can have the same square (take $ -1 $ and $ 1 $). This also means that there is no way to retrieve the original number from its square, unless you already know its sign, because the squaring function is injective on $ \mathbb{R}^+ $ alone (the positive real numbers) or $ \mathbb{R}^- $.
Even more, it is bijective as a function from $ \mathbb{R}^+ $ to itself, which means that there is a one-to-one correspondance between positive numbers and their squares. Thus there is a function which does the inverse of squaring (its inverse function) : this is what we call the square root. This exactly means that for $ x \geq 0 $, that $ \sqrt{x^2} = x $.
Those are concepts from set theory, which you can explore further on wikipedia (a good resource for such elementary concepts).
Hint: $$\sqrt{x^2} = |x|$$
the modulus function.
And $ |-2| = |2|$
Comment if you still don't understand.