An n × n {\displaystyle {}n\times n} -matrix ( a i j ) i j {\displaystyle {}{\left(a_{ij}\right)}_{ij}} over a field K {\displaystyle {}K} is called a magic square (or linear-magic square over K {\displaystyle {}K} ), when every column sum and every row sum in the matrix equals a certain number c ∈ K {\displaystyle {}c\in K} .