Inmathematics, amatrix of ones orall-ones matrix is amatrix with every entry equal toone.[1] For example:
Some sources call the all-ones matrix theunit matrix,[2] but that term may also refer to theidentity matrix, a different type of matrix.
Avector of ones orall-ones vector is matrix of ones havingrow or column form; it should not be confused withunit vectors.
For ann ×n matrix of onesJ, the following properties hold:
WhenJ is considered as a matrix over thereal numbers, the following additional properties hold:
The all-ones matrix arises in the mathematical field ofcombinatorics, particularly involving the application of algebraic methods tograph theory. For example, ifA is theadjacency matrix of ann-vertexundirected graphG, andJ is the all-ones matrix of the same dimension, thenG is aregular graph if and only ifAJ = JA.[7] As a second example, the matrix appears in some linear-algebraic proofs ofCayley's formula, which gives the number ofspanning trees of acomplete graph, using thematrix tree theorem.
The logicalsquare roots of a matrix of ones,logical matrices whose square is a matrix of ones, can be used to characterize thecentral groupoids. Central groupoids are algebraic structures that obey theidentity. Finite central groupoids have asquare number of elements, and the corresponding logical matrices exist only for those dimensions.[8]