Hermitian matrices and cohomology of Kaehler varieties