Tap the blue circles to see an explanation.
$$ \begin{aligned}(x+y+z+q)^2& \xlongequal{ \color{blue}{ \text{\normalsize{ \htmlClass{explanationCircle explanationCircle1}{\textcircled {1}} \htmlClass{explanationCircle explanationCircle2}{\textcircled {2}} } }}}q^2+2qx+2qy+2qz+x^2+2xy+2xz+y^2+2yz+z^2\end{aligned} $$ | |
① | Multiply each term of $ \left( \color{blue}{x+y+z+q}\right) $ by each term in $ \left( x+y+z+q\right) $. $$ \left( \color{blue}{x+y+z+q}\right) \cdot \left( x+y+z+q\right) = \\ = x^2+xy+xz+qx+xy+y^2+yz+qy+xz+yz+z^2+qz+qx+qy+qz+q^2 $$ |
② | Combine like terms: $$ x^2+ \color{blue}{xy} + \color{red}{xz} + \color{green}{qx} + \color{blue}{xy} +y^2+ \color{orange}{yz} + \color{blue}{qy} + \color{red}{xz} + \color{orange}{yz} +z^2+ \color{red}{qz} + \color{green}{qx} + \color{blue}{qy} + \color{red}{qz} +q^2 = \\ = q^2+ \color{green}{2qx} + \color{blue}{2qy} + \color{red}{2qz} +x^2+ \color{blue}{2xy} + \color{red}{2xz} +y^2+ \color{orange}{2yz} +z^2 $$ |