R2 and correlation coefficient relationship

R2 score can be negative. Then how is R2 square of correlation coefficient?

• That is because there is more than a single definition for $R^2$. Check the Wikipedia entry. – Ami Tavory Dec 1 '17 at 11:23

$R^2$ can only be negative if your model (erroneously) doesn't include an intercept, or if you're computing it on a data set independent to the data that the model was estimated on, and the model doesn't generalize well to that new data set.
A correlation coefficient, between two variables $(x,y)$, basically describes the goodness-of-fit of a simple linear model, consisting of a single predictor ($x$) and an intercept. The way the correlation coefficient is computed is equivalent to fitting this linear model to some data, and computing its goodness-of-fit on the same data. Therefore, the correlation coefficient does not meet either of the criteria above, and thus $R^2$ values derived from correlation coefficients are positive by definition.
Another way to see this is that at worst, a correlation coefficient can be 0, which means the univariate linear model implied in the correlation analysis explains no variance. Explaining no variance is equivalent to an $R^2$ of 0. But it is impossible for the correlation model to explain negative variance, i.e. to perform worse than the sample mean, since the correlation model includes the sample mean through its intercept.
For a correlation analysis, $R^2$ can be computed as the square of the correlation coefficient, and will then behave as described above. But as Ami Tavory pointed out, $R^2$ has other definitions, and in general, can be computed for any model, not just correlations. In those cases, one of the scenarios may occur that I described at the beginning, and then $R^2$ can be negative.