AbstractWe introduce a generalized Demjanenko matrix associated with an arbitrary abelian field of odd prime power conductor, and exhibit direct connections between this matrix and both the relative class number and the cyclotomic units of the field. Beyond using the analytic class number formula, all arguments are elementary. Combining the two connections yields a simple proof that the relative class number is odd if and only if all the totally positive cyclotomic units are squares of cyclotomic units, which was known by results of Hasse and Garbanati. An interesting feature of our new class number formula is its expression as the determinant of a matrix with relatively small integer entries. Thus we also easily obtain a reasonable upper b...