A simple model that can be used to describe a broad class of quantum systems is the two-level system (TLS). This is a system in which there are only two eigenstates: ground (g) and excited (e).
Let these states correspond to wave functions $\Psi_e$ and $\Psi_g$. Then any state of the TLS $\Psi$ is a superposition of $\Psi_e$ and $\Psi_g$ and is therefore completely characterised by two numbers $\alpha$ and $\beta$:
\[ \Psi = \alpha \Psi_e + \beta \Psi_g, \]where $\alpha \alpha^* + \beta \beta^* = 1$. To study the behaviour of a TLS, it is not necessary to specify its nature or even to explicitly use wave functions, so we introduce the state vector $|\psi\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}$.
Any operator $\hat{A}$ acting on the wave functions of the TLS is a $2 \times 2$ matrix that acts on the state vector:
\[ \hat{A} | \psi \rangle = \begin{pmatrix} A_{ee} & A_{ge} \\ A_{eg} & A_{gg} \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix}.\]
Every physical quantity in quantum mechanics corresponds to an operator. For example, we can measure the coordinate $x$ of a quantum system. Let the coordinate operator have the form
\[ \hat{x} = \begin{pmatrix}
0 & a \\
a & 0 \end{pmatrix}.\]
When measuring the coordinate $x$ of the same state in quantum mechanics, we will obtain different values. The state we are interacting with can be judged only by the statistics of the measured values. For example, the average observed value of the coordinate $\langle x \rangle$ for a state with wave vector $|\psi\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}$ is given by the expression
\[ \langle x \rangle = \langle \psi | \hat{x} |\psi \rangle = \begin{pmatrix} \alpha^* & \beta^* \end{pmatrix} \begin{pmatrix} 0 & a \\ a & 0 \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix} \]