Canonical correlation analysis uses metric variables divided into two sets - a dependent and an independent set (criterion and predictor). This technique constructs a new, linear variate from a set of variables so that the correlation between the two variables is maximized. Canonical correlation analysis produces canonical loadings (similar to factor loadings) that show the correlation between each variable and each of the variates. From this information, redundancies are calculated that represent the amount of variance in the dependent variables that is explained by the independent variate.
Canonical correlation can be performed either using the variance/covariance or the correlation matrix. The results are identical, except for the canonical loadings, which are standardized for variances in the case of the correlation matrix. You should understand why a covariance matrix of standardized data is the same as a correlation matrix.
Construct linear combinations for the Xs and Ys as:
W = v1X1 + v2X2 + vqXq
Z = u1Y1 + u2Y2 + upYp
Now adjust us and vs such that r[wz] is at a maximum as discussed in this document.