This help topic is for R version 1.1. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/crossprod.html
crossprod {base}R Documentation

Matrix Crossproduct

Description

Given matrices x and y as arguments, crossprod returns their matrix cross-product. This is formally equivalent to, but faster than, the call t(x) %*% y.

Usage

crossprod(x, y=x)

See Also

%*% and outer product %o%.

Examples

crossprod(1:4)    # = sum(1 + 2^2 + 3^2 + 4^2)
drop(.Last.value) # scalarized

[Package base version 1.1 ]