multiplying a linear system by an invertible diagonal matrix let $Ax = b$ be a linear n by n system
if we multiply this system by a non-singular diagonal $D$ I can say that the new system still has the same solution as the previous one , right ?
I ran some tests on matlab and noticed that the condition number stays all the time the same but our teacher claims that by this method we can make the condition number smaller of the system and he didn't explain why
can someone please clarify or give me an example where it is true ? thanks !

we have $Ax=b$ we change this to 
$$
DAx = b.
$$
This will be solvable if $A$ and $D$ are invertible since 
$$
(DA)^{-1} = A^{-1}D^{-1}
$$
In terms of condition numbers, suppose $D=A^{-1}$
then the new system is
$$
x=b
$$
which is nicely conditioned. So, yes, the condition number can change.
