# What does it mean to "measure an operator"?

I was reading a book and then I found this statement. I will put the text as well as a screenshot of the text.

The expectation value of an operator is the mean or average value of that operator with respect to a given quantum state. In other words, we are asking the following question: If a quantum state $$|\psi\rangle$$ is prepared many times, and we measure a given operator $$A$$ each time, what is the average of the measurement results? This is the expectation value and we write this as $$\langle A\rangle =\langle ψ|A|ψ \rangle$$ (3.39)

Here is the screenshot,

Any operator Hermitian $$A$$ can be described using its eigenvalue decomposition $$A=\sum_\lambda\lambda P_\lambda,$$ where $$\{\lambda\}$$ are the distinct eigenvalues and $$P_{\lambda}$$ are the projectors onto the corresponding eigenspaces. So, to talk about measuring an operator means to make a measurement using the basis $$\{P_{\lambda}\}$$. It also assigns a label of $$\lambda$$ to an outcome from the projector $$P_{\lambda}$$ and, since this is a numerical value, you can ask for the expected value of that number. For an initial state $$|\psi\rangle$$ you get answer $$\lambda$$ with probability $$\langle\psi|P_\lambda|\psi\rangle$$, so the expected value is $$\sum_{\lambda}\lambda\langle\psi|P_\lambda|\psi\rangle=\langle\psi|A|\psi\rangle.$$
In this case, "measuring an operator" is meant to describe measuring the observable associated with the operator. More commonly one would put a "using" or "with" or "with respect to" between "measure" and "a given operator". As usual, the operator's eigenvalues correspond to measurement results for the observable, and measuring the observable collapses the quantum state to a corresponding eigenstate of the operator, with a probability for each orthogonal eigenstate equal to the probability amplitude of the eigenstate multiplied by its complex conjugate. The Pauli Z operator is the operator for measuring on the 1-qubit computational basis, with a measurement of $$\left|0\right>$$ being associated with an eigenvalue of 1 and $$\left|1\right>$$ being associated with an eigenvalue of -1, and the Pauli X operator is similarly associated with the Hadamard basis, to name two.
The reason the expectation value for this is given by $$\left<\psi\right|A\left|\psi\right>$$ can be seen through noticing what happens when $$A$$ acts on each of its associated eigenstates, which $$\left|\psi\right>$$ is in general in a superposition of. For the finite case, with the set of eigenvalues of the operator being denoted $$S$$, you can represent the quantum state as $$\left|\psi\right> = \sum_{\lambda \in S}a_\lambda\left|s{_\lambda}\right>$$, where $$A\left|s_{\lambda}\right> = \lambda\left|s_{\lambda}\right>$$ and $$a_\lambda$$ are the associated probability amplitudes. Then $$A\left|\psi\right> = \sum_{\lambda \in S} \lambda a_\lambda \left|s_\lambda\right>$$. With $$\left<\psi\right| = \sum_{\lambda \in S}\bar a_\lambda\ \left and all the different $$\left|s_\lambda\right>$$ being orthogonal, we get $$\left<\psi\right|A\left|\psi\right> = \sum_{\lambda \in S} \lambda a_\lambda \bar a_\lambda$$. With the probability amplitudes multiplied by their complex conjugates being the probability of measurement, this is the traditional expected value formula.