Let $x$ and $y$ be two random variables. Using principal component analysis (PCA), I can find a linear projection making the two variables uncorrelated. PCA solves this problem through an eigenvalue decomposition. However, I was interested could I also solve this somehow by minimizing $c = corr(x, y)$, where $corr(\cdot)$ gives the Pearson correlation coefficient between $x$ and $y$, using gradient methods? This would allow me to make nice analytical-numerical solution comparisons and more fancy illustrations.