Square of Ones Matrix

Theorem
Let $\mathbf J = \left[{1}\right]_n$ be a square ones matrix of order $n$.

Then $\mathbf J^2 = n \mathbf J$.

That is:
 * $\begin{bmatrix}

1 & 1 & \cdots & 1 \\ 1 & 1 & \cdots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \cdots & 1 \end{bmatrix}^2 = \begin{bmatrix} n & n & \cdots & n \\ n & n & \cdots & n \\ \vdots & \vdots & \ddots & \vdots \\ n & n & \cdots & n \end{bmatrix}$

Proof
Follows directly from the definition of matrix multiplication:


 * $\displaystyle \forall i \in \left[{1 \,.\,.\, m}\right], j \in \left[{1 \,.\,.\, p}\right]: c_{i j} = \sum_{k \mathop = 1}^n a_{i k} \circ b_{k j}$

In this case, $m = n$ and $a_{ik} = b_{kj} = 1$.

Hence:
 * $\displaystyle c_{i j} = \sum_{k \mathop = 1}^n 1 \times 1 = n$