Rayleigh quotient in the infinite-dimensional case The finite-dimensional case
Let $n\in\mathbb N$ and let $A\in\mathbb C^{n\times n}$ be a Hermitian matrix (i.e. $A$ is equal to the complex conjugate of its transpose). As a Corollary of the spectral Theorem, we know that $A$ has $n$ real eigenvalues (counted by algebraic multiplicity). Then the Courant–Fischer–Weyl min-max Theorem states that, with*
$$R_A(x):=\frac{\langle Ax, x\rangle}{\langle x,x\rangle},$$
we have that the smallest eigenvalue of $A$ is  equal to
$$\min_{x\in\mathbb C^n\setminus\{ 0\}} R_A(x)$$
and the largest eigenvalue of $A$ is equal to
$$\max_{x\in\mathbb C^n\setminus\{0\}} R_A(x).$$
The infinite-dimensional case
My question: Is there a similar result for the infinite-dimensional case? For instance, if $T:D(T)\to H$ is a linear operator, where $H$ is a Hilbert space over $\mathbb C$ and $D(T)\subset H$ is dense, can we say that, if $T$ is self-adjoint, then the smallest element of the spectrum of $T$ (which is necessarily real, see here) is given by
$$\min_{x\in D(T): \| x\|= 1} \langle Tx, x\rangle$$
and analogously that
$$\max_{x\in D(T): \| x\|= 1} \langle Tx, x\rangle$$
is the largest element of the spectrum of $T$ ?

* Note that $R_A(x)$ is real for all $x\in\mathbb C^n\setminus\{0\}$, since $\overline{\langle Ax, x\rangle} = \langle x, Ax\rangle = \langle Ax,x\rangle$ for all Hermitian $A$.
 A: I'll just treat the minimum, the maximum works the same way. The minimum of $\{\langle Tx,x\rangle: x\in D(T),\|x\|=1\}$ does not necessarily exist (the set might even be unbounded from below), but the infimum does always equal the infimum of the spectrum (which is either $-\infty$ or actually the minimum).
This is not hard to prove once you know the spectral theorem: There exists a projection-valued measure $E$ on $\mathbb R$ such that
\begin{align*}
D(T)&=\left\{\xi\in H :\int\lambda^2\,d\langle E(\lambda)\xi,\xi\rangle<\infty\right\},\\
T\xi&=\int\lambda\,dE(\lambda)\xi,\;\xi\in D(T)
\end{align*}
and $\sigma(T)$ is the support of $E$, that is, the set of all $\lambda\in\mathbb R$ such that $E((\lambda-\epsilon,\lambda+\epsilon))\neq 0$ for all $\epsilon>0$.
Let $(\lambda_n)$ be a decreasing sequence in $\sigma(T)$ such that $\lambda_n\to-\infty$ and let $(\xi_n)$ be a sequence of unit vector such that $E((\lambda_n-1/n,\lambda_n+1/n))\xi_n=\xi_n$. In particular, $\xi_n\in D(T)$ and
$$
\langle T\xi_n,\xi_n\rangle=\int_{\lambda_n-1/n}^{\lambda_n+1/n}\lambda\,d\langle E(\lambda)\xi_n,\xi_n\rangle\leq (\lambda_n+1/n)\to\inf\sigma(T).
$$
Thus $\inf_{\|\xi\|=1}\langle T\xi,\xi\rangle\leq \inf\sigma(T)$.
On the other hand,
$$
\langle T\xi,\xi\rangle=\int_{\sigma(T)}\lambda\,d\langle E(\lambda)\xi,\xi\rangle\geq \inf\sigma(T)\int d\langle E(\lambda)\xi,\xi\rangle=\inf\sigma(T)\|\xi\|^2.
$$
Note that even if $T$ is bounded from below, the set $\{\langle T\xi,\xi\rangle:\xi\in D(T),\,\|\xi\|=1\}$ does not necessarily have a minimum. For example, the infimum of this set is clearly $0$ if $T$ is the (bounded self-adjoint) operator on $\ell^2$ acting by $T(a_n)=(a_n/n)$, yet there is no $(a_n)\in \ell^2$ such that $\langle T(a_n),(a_n)\rangle=0$.
