# QDA number of parameters

If we include to Linear Discriminant Analysis quadratic parameters we get Quadratic Discriminant Analysis classifier. Number of parameters is $$(K-1)\times[(p\times(p+3)/2) + 1]$$ where K is number of classes and p is number of features.

Why $$K-1$$? In the book it is said that we only need to compare $$\delta_{k}(x) - \delta_{K}(x)$$ of discriminant functions of some prespecified class K, but why do we do that and how it works?

$$(p\times(p+3)/2) + 1$$ is number of factors in multivariate quadratic function how is it calculated?