Formula for a quadratic form involving a matrix inverse

Help me please to understand the formula:

Let $A$ be $n\times n$ matrix, $b$ some real number and $x$ some vector. Matrix $(A-bI)$ is $n\times n$ nonsingular matrix.

If $y_k$ are eigenvectors of the matrix $A$, then the following is true:

$$x^T(A-bI)^{-1}x=\sum_{k=1}^n \frac{(x,y_k)^2}{\lambda_k-b}$$

here $\lambda_k$ are the eigenvalues of $A$.

I do understand how we can get denominator — this is just a denominator of $(A- bI)$, because $(A-bI)^1=\det(A-bI)^{-1} \operatorname{adj}(A-bI)$.

but I don't understand how we get numerator.

Thank you

-
Could you please make sure that you've written what you meant to write in that first equation? The left-hand side isn't defined (perhaps you mean to transpose one of the two appearances of $x$?) and the right-hand side doesn't have anything to do with $x$. And why is the 2 in superscript? – Brad Nov 27 '11 at 17:38
Sorry, its typo the right formula is: x^T (A-bI) x= \sum_{k=1}^n \frac{(x, y_k)^2}{\lambda_k -b} thank you. – David Nov 27 '11 at 17:52
If spectral for is allowed (which perhaps requires $A$ to be normal), then it becomes very easy. But I don't know about the general case. – Tapu Nov 27 '11 at 20:33

If you have the eigendecomposition $\mathbf A=\mathbf V\mathbf D\mathbf V^\top$, then $(\mathbf A-b\mathbf I)^{-1}=\mathbf V(\mathbf D-b\mathbf I)^{-1}\mathbf V^\top$, where
$$(\mathbf D-b\mathbf I)^{-1}=\mathrm{diag}\left(\frac1{d_{1,1}-b},\dots,\frac1{d_{n,n}-b}\right)$$
Thus, $\mathbf x^\top(\mathbf A-b\mathbf I)^{-1}\mathbf x=\mathbf x^\top\mathbf V(\mathbf D-b\mathbf I)^{-1}\mathbf V^\top\mathbf x=(\mathbf x^\top\mathbf V)(\mathbf D-b\mathbf I)^{-1}(\mathbf x^\top\mathbf V)^\top$. You should now be able to expand that into the sum expression you have...
The eigendecomposition always exists...? In my comment to the OP, I asked $A$ to be normal to ensure the spectral form. – Tapu Nov 28 '11 at 6:56
Well, he certainly can't have $n$ eigenvectors just like in his summation expression if his matrix is defective... – J. M. Nov 28 '11 at 10:41
Then can I assume spectral form for $A$ namely $A=\sum_k\lambda_ky_ky_k^t$...? – Tapu Nov 28 '11 at 16:02