In Python numpy a row vector $u \in \mathbb{R}^n$ and its transposed $u^T$ can be added, multiplied or subtracted, yielding a $\mathbb{R}^{n\times n}$ matrix, where each element $(i,j)$ is the addition, subtraction or multiplication of the element $u_i$ and $u_j$.
For example
import numpy as np
x = np.array([[0],[1],[2]])
x-x.T
yields the matrix
[[ 0, -1, -2],
[ 1, 0, -1],
[ 2, 1, 0]]
I am struggling however to understand how to write this in a nice mathematical notation. Rank 1 products can be written mathematically as $x x^T$, but what for other operations, like addition? I don't think $x+x^T$ is a viable one, as in the case of product the dot product is meant.
One possible notation would be $x \cdot 1^T + 1 \cdot x^T$, where $1$ is a vector of ones the same size as $x$.