From classical harmonic oscillator it is clear that:

$a^{\dagger}a = \frac{H}{\hbar\omega}-\frac{1}{2}$

I found some "alternative" notation of creation and annihilation operators multiplication:

$a^{\dagger}a = \sum_{j}j|j\rangle\langle j|$, why it is true?

  • $\begingroup$ Does this help? $\endgroup$ Commented Jun 25, 2021 at 13:45
  • $\begingroup$ I'm not sure, whether it is correct. If I consider this multiplication as number operator: $N = a^{\dagger}a$, next, I'll act on some state n: $N|n\rangle = n|n\rangle$, and, finally, if I consider the notation as in my question, it'll be: $N|n\rangle = n|n\rangle\langle n|n\rangle$, $N|n\rangle = n|n\rangle$, looks like it is the same as the previous notation, but why should I use summation here? $\endgroup$
    – Curious
    Commented Jun 25, 2021 at 14:16
  • $\begingroup$ Possible duplicate: physics.stackexchange.com/questions/645822/… $\endgroup$ Commented Jun 25, 2021 at 14:36
  • 1
    $\begingroup$ The summation is "required" because you don't know in advance on which state $|n\rangle$ your operator is going to act - it has to be "ready" to act on any number state $|j\rangle$. $\endgroup$ Commented Jun 25, 2021 at 14:41

3 Answers 3


The first form you gave only holds for the simple harmonic oscillator; however, the second form holds both for the simple harmonic oscillator but also the more general use of creation and annihilation operators in quantum field theory.

Creation operators add a quanta to a system while anhillation operators remove a quanta, this then applies to the simple harmonic oscillator as we have quanta of energy $\hbar\omega$. But for quantum field theory these quanta are particles. If we use the basis $\left\{|n\rangle\right\}$ where $n$ is the number of quanta in the system then the action of the creation and anhillation operators is as follows:


As $\left\{|n\rangle\right\}$ is a complete orthornomal basis then we can express the operators in this basis:

$$a\equiv\sum_{j,m}a_{jm}|j\rangle\langle m|$$

where $\left\{a_{jm}\right\}$ are the matrix elements in this basis. Post multiplying by $|n\rangle$ we get:

$$a|n\rangle=\sum_{j,m}a_{jm}|j\rangle\langle m|n\rangle$$

And as the basis is orthonormal then $\langle m|n\rangle\equiv\delta_{mn}$ is the Kronecker delta; thus, the sum becomes:


Next, by the coefficients of $\left\{|n\rangle\right\}$ in equations (1) and (2) we can see:

$$\begin{align}a_{jn}&=\cases{\sqrt{n},&j=n-1\\0,&otherwise}\\\implies a&=\sum_m\sqrt{m}|m-1\rangle\langle m|\end{align}$$

Note taking the adjoint of $a$ gives:

$$a^\dagger=\sum_m\sqrt{m}|m\rangle\langle m-1|=\sum_m\sqrt{m+1}|m+1\rangle\langle m|$$

Which is consistent with the definition of the creation operator above.

Finaly, we can take the product:

$$\begin{align}a^\dagger a&=\sum_l\sqrt{l}|l\rangle\langle l-1|\sum_m\sqrt{m}|m-1\rangle\langle m|\\&=\sum_{l,m}\sqrt{lm}|l\rangle\underbrace{\langle l-1|m-1\rangle}_{\equiv\delta_{\left(l-1\right),\left(m-1\right)}=\delta_{lm}}\langle m|\\&=\sum_{m}m|m\rangle\langle m|\end{align}$$

This result makes sense as we define the number operator $N\equiv a^\dagger a$ post multiplying by $|n\rangle$ gives the expected result:

$$N|n\rangle=a^\dagger a|n\rangle=\sum_{m}m|m\rangle\underbrace{\langle m|n\rangle}_{\equiv\delta_{mn}}=n|n\rangle$$

Aside on Basis Representations of Operators

Operators map from one vector space to another. Consider a general operator $B$ that maps from a vector space $V$ to the vector space $W$. Let $\left\{|n\rangle_v\right\}$ and $\left\{|n\rangle_w\right\}$ be complete bases of the vector spaces V and W respectively (they need not be number states as used in the answer, but we will use the same labelling conversion for ease).

As any vector can be decomposed into a linear combination of a complete basis then let:

$$|\phi\rangle\equiv\sum_n\alpha_n|n\rangle_v\quad\text{and}\quad|\psi\rangle\equiv B|\phi\rangle=\sum_m\beta_m|m\rangle_w$$

then clearly $\beta_m\left(\left\{\alpha_n\right\}\right)$ must each be some function of the coefficients $\left\{\alpha_n\right\}$. As we are interested in linear operators this implies that $\beta_m\left(\left\{\alpha_n\right\}\right)$ must be linear in $\left\{\alpha_n\right\}$. Thus, we can express $\beta_m\left(\left\{\alpha_n\right\}\right)$ as:

$$\beta_m\left(\left\{\alpha_n\right\}\right)=\sum_n b_{mn}\alpha_n$$

for some set of coefficients $\left\{b_{mn}\right\}$ (there is no constant term as we require $B0=0$).

Now if we impose the further restriction on both bases that they are orthonormal as well as complete then we can write $\alpha_n\equiv\,_v\langle n|\phi\rangle$ so:

$$\begin{align}\beta_m\left(\left\{\alpha_n\right\}\right)&=\sum_n b_{mn}\,_v\langle n|\phi\rangle\\\implies B|\phi\rangle&=\sum_{n,m}b_{mn}\,_v\langle n|\phi\rangle|m\rangle_w\tag{3}\\&=\sum_{n,m}b_{mn}|m\rangle_w\,_v\langle n|\phi\rangle\tag{4}\end{align}$$

where (4) follows from (3) because $_v\langle n|\phi\rangle$ is a scalar and can be moved past the ket $|m\rangle_w$. Finally, we can remove $|\phi\rangle$ from both sides of (4), you cannot normally "divide through" by a ket but because $|\phi\rangle$ is any ket in the vector space V then we can in this case, this gives:

$$B=\sum_{n,m}b_{mn}|m\rangle_w\,_v\langle n|\tag{5}$$

where $\left\{b_{mn}\right\}$ are called the matrix elements and $b_{mn}\equiv\,_w\langle m|B|n\rangle_v$ which can be shown by pre and post multiplying (5) by $_w\langle m|$ and $|n\rangle_v$ respectively.

In most situations, V and W are the same vector space so the subscripts are dropped. This is entirely equivalent to algebra with kets being column vectors, bras being row vectors and $B$ being a matrix with elements $\left\{b_{mn}\right\}$ - hence the name matrix elements.

  • $\begingroup$ Thank you so much for a very comprehensive explanation! Could you please clarify one moment for me - from where it follows that $a_{jn} \equiv 0$ for all j except j=n-1? $\endgroup$
    – Curious
    Commented Jun 25, 2021 at 15:25
  • $\begingroup$ and what are the vectors of the basis in the very beginning? Am I right, they are: n, m, l (introduction of j confused me a bit)? $\endgroup$
    – Curious
    Commented Jun 25, 2021 at 15:32
  • $\begingroup$ I have updated the answer to hopefully, clarify which equations are being compared to identify $a_{jn}$. Let me know if this makes sense? $\endgroup$
    – Chris Long
    Commented Jun 25, 2021 at 15:44
  • $\begingroup$ Throughout the answer all bras and kets are from the complete and orthonormal basis $\left\{|n\rangle\right\}\equiv\left\{|0\rangle,|1\rangle,|2\rangle,|3\rangle,\ldots\right\}$ the letters $m$, $l$, $j$ are just various dummy variables that I sum over, i.e. $\sum_m\equiv\sum_{m=0}^\infty$. When I post multiply by $|n\rangle$ this is just post multiplication by an arbitrary ket from the $\left\{|n\rangle\right\}$ basis. $\endgroup$
    – Chris Long
    Commented Jun 25, 2021 at 15:48
  • $\begingroup$ Thank you for numbering equations, but I wanted to ask, why all the $a_{jn}\equiv 0$ except $j = n-1$. To be more precise: why, for example, at $j = n-2$, we'll get $a_{n-2,n} = 0$? It is not clear from (1). Hope now I correctly asked the issue. $\endgroup$
    – Curious
    Commented Jun 25, 2021 at 16:07

In the following we will ignore (probably many) mathematical issues and provide an 'intuitive' reason.

Consider a (hermitian) observable $A$. We denote its eigenvalues by $a$ and the corresponding eigenvectors by $|a\rangle$ and hence: $$A\,|a\rangle = a\, |a\rangle \quad. $$

We can show that the set of eigenvectors of $A$, $\{|a\rangle\}_a$, forms a complete orthonormal basis set, that is:

$$\mathbb{I}=\sum\limits_a |a\rangle \langle a| \quad , $$ with $\langle a^\prime|a\rangle = \delta_{aa^\prime}$. Here, $\mathbb{I}$ denotes the identity operator. In particular, any element of the Hilbert space can be written as a superposition of these states:

$$|\Psi\rangle = \mathbb{I}\,|\Psi\rangle = \sum\limits_a c_a\, |a\rangle \quad , $$

where $c_a \equiv \langle a|\Psi\rangle$. Let us consider the action of $A$ on $|\Psi\rangle$. We compute:

$$A\,|\Psi\rangle = \sum\limits_a c_a\, A\, |a\rangle = \sum\limits_a c_a\, a\, |a\rangle \quad , $$

which follows from the linearity of $A$. Next, we define $$ A^\prime \equiv \sum\limits_a a\,|a\rangle \langle a|$$ and also study its action on the generic state $|\Psi\rangle$:

$$A^\prime \, |\Psi\rangle = \sum\limits_{a^\prime} \sum\limits_a c_a\, a^\prime |a^\prime \rangle \underbrace{\langle a^\prime|a\rangle}_{=\delta_{aa^\prime}} = \sum\limits_a c_a\, a\,|a\rangle = A\, |\Psi\rangle \quad . $$

The above equation holds true for any state $|\Psi\rangle$. We thus conclude that $A$ and $A^\prime$ have the same action on every state. In other words, both operators are the same:

$$A = \sum\limits_a a\,|a\rangle \langle a| \tag{$*$} $$ because operators are defined by their action on the elements of the Hilbert space.

Alternatively, we could also argue that $$ A= A\, \mathbb{I} = \sum\limits_a A\, |a\rangle\langle a| = \sum\limits_a a\, |a\rangle\langle a| \quad. $$

A more formal reason for the equality $(*)$ (and under which conditions it holds and can be generalized etc) is given by the spectral theorem.

More generally, if we have a complete orthonormal basis $\{|k\rangle\}$, then $$ A = \mathbb{I}A\mathbb{I} = \sum\limits_{kk^\prime} |k\rangle \langle k|A|k^\prime \rangle \langle k^\prime| \equiv \sum\limits_{kk^\prime} A_{kk^\prime}\, |k\rangle \langle k^\prime| \quad.$$ Now it is easy to see that if this basis happens to be the eigenbasis of $A$, then we'll arrive at the expression derived before.


So yeah, one has in the number basis that the annihilator can be expressed as

$$ a = \sum_{k} \sqrt{k} ~|k-1\rangle\langle k|$$

The sum here just means that this covers all of your basis states. For a fermionic annihilator the basis is $|0\rangle,|1\rangle$ and this is the fantastically simple operator $a = |0\rangle\langle1|,$ but for bosons the sum goes from 0 to infinity we need this bigger idea of $|0\rangle\langle1| + \sqrt2 ~|1\rangle\langle 2| + \sqrt3 ~|2\rangle\langle3|\dots$.

This can kind of be looked at as a definition. If it were me I probably would not have been smart enough to use $\sqrt{k}$ and I would not have unlocked the great power of creation and annihilation operators!

Combined with the orthogonality property, $$\langle a |b\rangle = \begin{cases} 1& \text{if }a=b,\\ 0&\text{otherwise} \end{cases}$$ we can see that $$a^\dagger a = \sum_{k\ell}\sqrt{k\ell}|k\rangle\langle k-1|\ell-1\rangle\langle\ell| = \sum_k \sqrt{k^2} ~|k\rangle\langle k |$$which as long as $k$ is nonnegative in the basis so that $\sqrt{k^2} = k,$ we recognize as the number operator $\hat n.$ Meanwhile the opposite is, $$ a a^\dagger = \sum_{k\ell}\sqrt{k\ell}|k-1\rangle\langle k|\ell\rangle\langle\ell-1| = \sum_k \sqrt{k^2} ~|k-1\rangle\langle k-1 |$$After renumbering we can identify this for bosons (number basis goes zero to infinity) as $\hat n + 1$, or for fermions (zero or one) as $|0\rangle\langle 0|$ which you could call $1 - \hat n$ as $\hat n = |1\rangle\langle 1|$ while the identity matrix $1=|0\rangle\langle0|+|1\rangle\langle1|.$ So eliminating the $\hat n$ the genius of the choice $\sqrt{k}$ was that we get the (anti-)commutation relations,$$ \begin{align} a a^\dagger - a^\dagger a &= \big[a, a^\dagger\big] ~= 1 &\text{ (bosons)},\\ a a^\dagger + a^\dagger a &= \big\{a, a^\dagger\big\}=1 &\text{ (fermions)}. \end{align} $$ The genius of the harmonic oscillator derivations, is surprisingly generic and applies even without the harmonic oscillator Hamiltonian. It is to recognize the boson case inside the canonical commutation relation,$$[\hat x, \hat p/\hbar] = i.$$The idea is that if I take a leap to form the non-Hermitian $\hat q = \hat x + i \hat p/\hbar$ then going through the motions I will find $$\big[\hat q, \hat q^\dagger\big] = [i\hat p/\hbar, \hat x] + [\hat x, -i\hat p/\hbar] = 2,$$ thus I can treat $\hat q/\sqrt{2}$ as a bosonic annihilator. Well, that does not precisely work because it turns out that the sum $\hat x + i \hat p/\hbar$ is invalid, the units are inconsistent. But this is a very small problem, if I have some length scale $\lambda$ that I take as conventional, then I can use the dimensionless configuration just fine, $$a = \frac{1}{\sqrt 2\lambda} \hat x + i \frac{\lambda}{\sqrt 2 \hbar} \hat p.$$ So the harmonic oscillator is not necessary to do this trick, it's just that this was presumably how creation and annihilation operators were discovered: someone saw $x^2 + p^2$ and thought “a sum of two squares, huh, I know the difference of two squares can be written in a certain way, I wonder if complex numbers allow me to write the sum of two squares analogously” and discovering that yes, indeed, it can be written as $(x + i p)(x - i p)$, which would normally have been a non-starter in quantum mechanics as $xp \ne px$ but in this particular case, that works out to be some constant energy offset and we have the physical principle that absolute values of energy are not important but only energy differences, so you do not care so much about this ground-state energy $\hbar\omega/2,$ and you just have $H = \hbar \omega (a^\dagger a + 1/2)$ which perhaps prompted some further investigation about the physical meaning of $a$.

  • 1
    $\begingroup$ So like before you ran into quantum mechanics what you knew was Euclidean 3D space with basis vectors $\hat e_1,\hat e_2, \hat e_3$ as unit vectors in three different directions we could call $x_1,x_2,x_3$, or maybe your prefer $x,y,z$ and to call these $\mathbf i,\mathbf j,\mathbf k$. These are “kets” as we'd phrase them in QM, so like if you forget about the “number basis” the quantum notation could instead be configured to call these vectors $|1\rangle,|2\rangle,|3\rangle$. To these we add the notion of covectors, things which take a vector and produce a number, these are the “bras.” $\endgroup$
    – CR Drost
    Commented Jun 27, 2021 at 18:54
  • 1
    $\begingroup$ So the bra $\langle 1|$ is notation for the Euclidean $(\hat e_1\cdot)$, a function taking a vector that dots it with $\hat e_1$. To say these are a complete basis means that every other vector in the space is a linear combination of them,$$|v\rangle=v_1|1\rangle+v_2|2\rangle+v_3|3\rangle.$$Orthonormal, means that $$\langle m| n\rangle=\{1\text{ if } m=n\text{ else }0\}.$$Combine these to find $v_1=\langle1|v\rangle$ so Jakob can say$$\mathbb I=|1\rangle\langle1|+|2\rangle\langle2|+|3\rangle\langle3|=\sum_k|k\rangle\langle k|,$$we would say these basis states “resolve the identity operator.” $\endgroup$
    – CR Drost
    Commented Jun 27, 2021 at 19:10
  • 1
    $\begingroup$ So the bra/ket notation can be used anywhere linear algebra is used, it doesn't have to be quantum. The main difference in the notation is actually really subtle, it is that when we form the bra corresponding to a ket, we choose to always take the complex conjugate, so that $$\langle v|=v_1^* \langle 1|+v_2^* \langle 2|+v_3^* \langle 3|.$$the reason I say this is subtle is because the basis vectors all have ones and zeros for their coefficients and the complex conjugate of one or zero is one or zero, so you don't immediately notice this. But it amounts to a specific choice of dot product used. $\endgroup$
    – CR Drost
    Commented Jun 27, 2021 at 19:18
  • 1
    $\begingroup$ So what you are asking about is a theory trick, $\mathbb I$ is the identity transform which is the matrix equivalent of multiplying by one, it doesn't technically do anything by itself. And the trick is to start from there but write “times one” in an interesting way. The reason we do this is because it is easier to remember and harder to make mistakes, the FFT equivalent would be to write a function as its Fourier inverse transform of its Fourier transform, you have “done nothing” but now you have the Fourier transform expression available for your manipulation. $\endgroup$
    – CR Drost
    Commented Jul 8, 2021 at 1:23
  • 1
    $\begingroup$ Why is this useful? Let me give a different example. I might teach you to convert units in two ways. The way I prefer to teach units is by substitution, 5 km/hr = 5 · (1000 m)/(60 min) = 5 · (1000 m)/(60 · (60 s)). But this is not how my chemistry TA did it! He preferred to say that 1 km = 1000 m therefore (1 km)/(1000 m) = 1, so I have a clever way to write 1 which I can use. In this case 5 km/hr = 5 km/hr · 1 · 1 · 1 = 5 km/hr · 1000 m/km · 1 hr/60 min · 1 min/60 s, and then “cancel like units.” It's the same idea: I know I can multiply by 1 safely, and here is a useful way to write 1. $\endgroup$
    – CR Drost
    Commented Jul 8, 2021 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.