Prove triangle similiarity by given expression I am working on the following problem, but I can't seem to figure it out.

The length of the sides in the triangle $T_1$ are $a_1$, $b_1$ and $c_1$. The length of the sides in the triangle $T_2$ are $a_2$, $b_2$ and $c_2$. Moreover: $$\sqrt{a_1 a_2} + \sqrt{b_1 b_2} + \sqrt{c_1 c_2} = \sqrt{(a_1 + b_1 +c_1)(a_2 + b_2 +c_2)}.$$ Show that the triangles are similar.

Any help would be appreciated
 A: An alternative geometric approach is presented. 
Consider vectors $\mathbf{x}=(\sqrt{a_1},\sqrt{b_1},\sqrt{c_1})\in \mathbb{R}^3$ and $\mathbf{y}=(\sqrt{a_2},\sqrt{b_2},\sqrt{c_2})\in \mathbb{R}^3$. 
Then, considering the vector dot product, we have $$\mathbf{x}\cdot\mathbf{y}=\lvert\mathbf{x}\lvert\lvert\mathbf{y}\lvert\cos\theta\\\Rightarrow\sqrt{a_1a_2}+\sqrt{b_1b_2}+\sqrt{c_1c_2}=\sqrt{(a_1+b_1+c_1)(a_2+b_2+c_2)}\cos\theta$$ The equation stated is the case when $\theta=0$. So vectors $\mathbf{x}$ and $\mathbf{y}$ will be linearly dependent, leading (for non-zero constant $k$, as the triangles have positive length sides) to $$a_1=ka_2,\ b_1=kb_2,\ c_1=kc_2\\\Rightarrow \frac{a_2}{a_1}=\frac{b_2}{b_1}=\frac{c_2}{c_1}$$ Thus the two triangles are similar. 
A: It's easy. Assume that, $a_i$'s, $b_i$'s and $c_i$'s are corresponding sides.
Now squaring both sides, and cancelling common terms both side, you get the identity something like this,$$\sum\limits_{\text{cyclic}}(\sqrt{a_1b_2}-\sqrt{b_1a_2})^2=0.$$
Which means, each square term is individually $0$. So, $$\sqrt{a_1b_2}-\sqrt{b_1a_2}=0\\\implies\frac{a_1}{a_2}=\frac{b_1}{b_2}.$$
Do this same approach for other two summands.
Which ultimately yields, $$\frac {a_1}{a_2}=\frac {b_1}{b_2}=\frac {c_1}{c_2},$$ proving the similarity of those triangles.
And it is the criteria for equality in Cauchy-Schwarz inequality.
A: This is immediate from the Cauchy-Schwarz inequality. Assuming you are not familiar with that we proceed from first principles:
$(x\sqrt{a_1}+\sqrt{a_2})^2+(x\sqrt{b_1}+\sqrt{b_2})^2+(x\sqrt{c_1}+\sqrt{c_2})^2\ge0$ so $(a_1+b_1+c_1)x^2+2(\sqrt{a_1a_2}+\sqrt{b_1b_2}+\sqrt{c_1c_2})x+(a_2+b_2+c_2)\ge0$ 
This quadratic in $x$ cannot have two real roots we must have $\sqrt{a_1a_2}+\sqrt{b_1b_2}+\sqrt{c_1c_2}\le\sqrt{(a_1+b_1+c_1)(a_2+b_2+c_2)}$
But we are told that we have equality, so there must be a real root $x$ and each term $(x\sqrt{a_1}+\sqrt{a_2})$ etc must be zero, which shows that the sides are proportional and hence the triangles similar.
