a set of equalities about the covariance of two vectors I am reading an article about circle fitting, I have two vectors $\alpha$ and $\beta$, they have $n$ components, the authors wrote that:

We note that for any vectors $(\alpha_i)$ and $(\beta_i)$,
$\sum_{i=1}^{n-1} \sum_{j=i+1}^{n}(\alpha_j-\alpha_i)(\beta_j-\beta_i)=$
$= n\sum_{i=1}^{n} \alpha_i \beta_i - (\sum_{i=1}^{n}\alpha_i)(\sum_{i=1}^{n} \beta_i)=$
$= n(n-1)S_{\alpha \beta}$
where $S_{\alpha \beta}$ is the usual covariance.

Why the preceding equalities are true?
What is the usual covariance of two vectors and how do I compute it?
Is the covariance defined in this way?
$cov(\alpha,\beta)=\sum_{i=1}^{n}\frac{(\alpha_i-\bar{\alpha})(\beta_i-\bar{\beta})}{N}$
$\bar{\alpha}=\sum_{i=1}^{n}\frac{\alpha_i}{n}$
$\bar{\beta}=\sum_{i=1}^{n}\frac{\beta_i}{n}$
and $\alpha_i$ is the $i$-th component of $\alpha$.
If I have an implementation of an algorithm for computing the covariance matrix, is it possible to get the covariance of two vectors from the covariance matrix?
The article is:
UMBACH, Dale; JONES, Kerry N. A few methods for fitting circles to data. Instrumentation and Measurement, IEEE Transactions on, 2003, 52.6: 1881-1885.
 A: I would try to prove the statement by induction by introducing
$$I(n):=\sum_{i=1}^{n-1} \sum_{j=i+1}^{n}(\alpha_j-\alpha_i)(\beta_j-\beta_i), $$
and
$$\gamma(n):=n\sum_{i=1}^{n} \alpha_i \beta_i - (\sum_{i=1}^{n}\alpha_i)(\sum_{i=1}^{n} \beta_i). $$
For $n=2$ we have
$$I(2):=\sum_{j=i+1}^{2}(\alpha_j-\alpha_1)(\beta_j-\beta_1)=
(\alpha_2-\alpha_1)(\beta_2-\beta_1)\stackrel{!}{=}
2(\alpha_1\beta_1+\alpha_2\beta_2)-(\alpha_1+\alpha_2)(\beta_1+\beta_2).$$
Let us suppose that $I(n)$ is true, let us prove that $I(n+1)$is true as well, i.e.
$$I(n+1):=\sum_{i=1}^{n} \sum_{j=i+1}^{n+1}(\alpha_j-\alpha_i)(\beta_j-\beta_i)=\sum_{i=1}^{n-1} \sum_{j=i+1}^{n+1}
(\alpha_j-\alpha_i)(\beta_j-\beta_i)+(\alpha_{n+1}-\alpha_{n})(\beta_{n+1}-\beta_{n})
=
I(n)+\sum_{i=1}^{n-1}(\alpha_{n+1}-\alpha_{i})(\beta_{n+1}-\beta_i)
+(\alpha_{n+1}-\alpha_{n} )( \beta_{n+1}-\beta_{n} )=\text{induction}=n\sum_{i=1}^{n} \alpha_i \beta_i - (\sum_{i=1}^{n}\alpha_i)(\sum_{i=1}^{n} \beta_i)+
\sum_{i=1}^{n-1}(\alpha_{n+1}-\alpha_{i})(\beta_{n+1}-\beta_i)
+(\alpha_{n+1}-\alpha_{n} )( \beta_{n+1}-\beta_{n} )=\gamma(n)+n\alpha_{n+1}\beta_{n+1}+
\sum_{i=1}^{n}\alpha_{i}\beta_i-\beta_{n+1}\sum_{i=1}^{n}\alpha_i-
\alpha_{n+1}\sum_{i=1}^{n}\beta_i=\gamma(n+1), $$
as a quick check (on $\gamma(n+1)$) shows. In the definition of covariance between the two vectors, one divides by $n-1$; this leads to the second equality, as requested.
