I belive, that outerProduct can be comptuded for vectors of diferent sizies. See here: http://en.wikipedia.org/wiki/Outer_product