  Hulls of linear codes have been of interest and extensively studied due to
their rich algebraic structures and wide applications. In this paper,
alternative characterizations of hulls of linear codes are given as well as
their applications. Properties of hulls of linear codes are given in terms of
their Gramians of their generator and parity-check matrices. Moreover, it is
show that the Gramian of a generator matrix of every linear code over a finite
field of odd characteristic is diagonalizable. Subsequently, it is shown that a
linear code over a finite field of odd characteristic is complementary dual if
and only if it has an orthogonal basis. Based on this characterization,
constructions of good entanglement-assisted quantum error-correcting codes are
provided.
