Sum of all elements in a matrix

The trace is the sum of the elements on the diagonal of a matrix. Is there a similar operation for the sum of all the elements in a matrix?


I don't know if it has a nice name or notation, but for the matrix $\mathbf A$ you could consider the quadratic form $\mathbf e^\top\mathbf A\mathbf e$, where $\mathbf e$ is the column vector whose entries are all $1$'s.


Using the sum of all elements does not contain any information about endomorphisms, which is the reason why you will not find such an operation in the literature.

If this is interesting enough, you can get the sum of all squares using the scalar product $$ \phi(A,B) := \mathrm{tr}(A^T B)$$ In fact $\mathrm{tr}(A^T A) = \sum_{i=1}^n \sum_{j=1}^n a_{i,j}^2$


The term "grand sum" is commonly used, if only informally, to represent the sum of all elements.

By the way, the grand sum is a very important quantity in the contexts of Markovian transition matrices and other probabilistic applications of linear algebra.

Regards, Scott


The max norm:

The max norm is the elementwise norm with $p = \infty$: $$ \|A\|_{\text{max}} = \max \{|a_{ij}|\}. $$ This norm is not sub-multiplicative. $p=\infty$ refers to $\Vert A \Vert_{p} = \left( \sum_{i=1}^m \sum_{j=1}^n |a_{ij}|^p \right)^{1/p}. \, $

If you want something without absolute bars, think of the projection of your matrix on $E$, $\text{tr}\left(E\cdot A\right)$, where $E$ is a matrix full of $1$'s, which is equivalent to calculate the scalar product $\langle e |Ae \rangle$, with $e$ being a vector full of $1$'s, since $|e \rangle \langle e|=E$.


You can certainly consider the sum of all the entries in a square matrix. But what would it be good for?

Mind that square matrices are a way to write explicitly endomorphisms (i.e. linear transformations of a space into itself) so that any quantity you attach to a matrix should be actually say something about the endomorphisms. Trace and determinant remain unchanged if the matrix $A$ is replaced by the matrix $PAP^{-1}$ where $P$ is any invertible matrix. Thus, trace and determinant are numbers that you can attach to the endomorphism represented by $A$.

It wouldn't be the case for the sum of all entries, which does not remain invariant under the said matrix transformation.