An outer product
results in a matrix where the row is the row of the first vector multiplied by the element of the second vector:
torch.einsum("i, j -> ij", [torch.arange(4), torch.arange(4)])
tensor([[0, 0, 0, 0],
[0, 1, 2, 3],
[0, 2, 4, 6],
[0, 3, 6, 9]])