Multiple Correlation Coefficient with three or more independent variables

The formula for the multiple coefficient of correlation of two independent variables ($x_1$ and $x_2$) and an dependent variables ($y$) is this:

What is the formula for three ($x_1$, $x_2$, $x_3$) or four ($x_1$, $x_2$, $x_3$, $x_4$) independent variables? I would like to know for my regression analysis.

One option is to just take the square root of the $R^2$ obtained when you do linear regression.
You can also do it this way: $R_{y \cdot \textbf{x}} = \sqrt{R_{y\textbf{x}}R_{\textbf{xx}}^{-1}R_{\textbf{x}y}}$, where the matrices are partitions of your sample correlation matrix: $R = \begin{pmatrix} 1 & R_{y\textbf{x}} \\R_{\textbf{x}y} & R_{\textbf{xx}} \end{pmatrix}$.