Function outerProduct

outerProduct(u,v) takes two vectors $u$, $v$ of equal length $n$, and returns the $n \times n$ outer product matrix $A$, with entries $A_{ij} = u_i v_j$.