Efficiently computes x' A x - or in R-notation:
x' A x
qform(x, A)
x
a numeric vector
A
a symmetric numeric matrix
Length of x should equal the number of rows and columns of A.
a numerical scalar