We study the question of positivity of quadratic funtionals Q(phi) = integr
al(Omega)C(0)(x)[V phi(x), del phi(x)]dx which typically arise as the secon
d variation at a critical point u of a functional. For interior points x(1)
is an element of Omega rank-one convexity of C-0(x(1)) is a necessary cond
ition for u to be a local minimizer. For boundary points x(2) is an element
of partial derivative Omega where phi is allowed to vary freely the strong
er condition of quasiconvexity at the boundary is necessary. For quadratic
functionals this condition is roughly equivalent to rank-one convexity and
Agmon's condition. We derive an equivalent condition on C-0(x(2)) which is
purely algebraic; and, moreover, it is variational in the sense that it can
be formulated in terms of positive semidefiniteness of Hermitian matrices.
A connection to the solvability of matrix-valued Riccati equations is esta
blished. Several applications in elasticity theory are treated.