Modern Physics: Chapter 5 – Fourier Transform I

XKCD – Fourier

To create a truly localized wavepacket we need to superpose not just two but an infinite amount of sinusoidal waves whose wavelengths and amplitudes vary in a continuous spectrum. To do that, we need to learn about what’s called the Fourier integral:

  • f(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} a(k) e^{ikx} dk


  • a(k) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(x) e^{-ikx} dx

Why an exponential function instead of sine and cosine? This is because we just used Euler’s formula:

  • e^{ix} = cos(x) + isin(x)

and it’s derivations:

  • cos(x) = \frac{e^{ix} + e^{-ix}}{2}
  • sin(x) = \frac{e^{ix} - e^{-ix}}{2i}

to replace the sines and cosines with the exponential function.

Essentially, this gives us a framework for expressing practically any function as a superposition of harmonic waves (just plug in the function f(x) in the expression for a(k) and then plug in a(k) into the expression for the Fourier integral). This is known as the Fourier transform.

Modern Physics: Chapter 4 – Wave Groups

In the last chapter, I discussed matter waves. Now, when one thinks about waves in general, one visualizes plane waves. Essentially something like this:

plane waves

Now, the mathematical function for a moving plane wave is of the form

  • f(x, t) = Acos(kx - wt)

where k = \frac{2 \pi}{\lambda} and w = 2 \pi f

You can use the following matlab script to generate a moving plane wave:

%Author: Muhammad A. Tirmazi
%Date: March 27, 2015
%Generating Moving Plane Waves

syms f x t;

A = 3;
k = 2;
w = 2;

f(x, t) = A*cos(k*x - w*t);

ix = 0:0.1:10;

for t = 0:0.1:60
    iy = double(f(ix, t));
    plot(ix, iy);
    pause(0.1 - toc);

Since the intensity matter waves describe the probability of finding a particle at a specific point in space, and since particles are limited to specific regions of space (the probability of finding them can’t just be equal at every point in the universe, the earth for example is far far far far far far more likely to be found in its orbit in the solar system than in the andromeda galaxy), plane waves of infinite extend and the same amplitude throughout are an incorrect representation for a moving particle.

The matter wave associated with a localized moving particle is, in fact, a wave packet. This is what a wave-packet looks like:

wave groups

Wave packets are created by the super-position of waves with similar but not exactly equal wave-numbers and angular frequencies. In other words, the mathematical function for a simple wave-packet created by the super-position of two waves is something like:

f(x, t) = Acos(k_{1}x - w_{1}t) + Acos(k_{2}x + w_{2}t)

You can use the following matlab script to generate a moving wave-packet:

%Author: Muhammad A. Tirmazi
%Date: March 27, 2015
%Generating Moving Wave Groups

syms f g h x t;

A = 3;
k1 = 4;
w1 = 4;
k2 = 4.3;
w2 = 4.3;

f(x, t) = A*cos(k1*x - w1*t);
g(x, t) = A*cos(k2*x - w2*t);
h(x, t) = f(x, t) + g(x, t);

ix = 0:0.1:20;

for t = 0:0.1:60
 iy = double(h(ix, t));
 plot(ix, iy);
 pause(0.1 - toc); 

The mathematical function describing a simple wave-packet can be simplified by using the identity

  • cos a = cos b = 2 \times cos \frac{1}{2}(a - b) \times cos \frac{1}{2}(a + b)

This results in a function of the form:

  • f(x, t) = 2Acos(\frac{\Delta x}{2}k - \frac{\Delta w}{2}t) \times cos(\frac{k_{1} + k_{2}}{2}x - \frac{w_{1} + w_{2}}{2}t)

where \Delta k = k_{2} - k_{1} and \Delta w = w_{2} - w_{1}.

However, we still have a problem with this function. A simple superposition of two slightly different waves generates wave-pulses that repeat at a constant interval. To represent a localized moving particle, we need a localized wave-packet. Essentially, we need something like this:

Modern Physics: Chapter 3 – Making (Non)Sense of the Double Slit Experiment

So let’s get this straight. An electron gives a wave-life diffraction pattern in the double slit experiment. It clearly shows wave behavior. However, as soon as you put detectors in front of the slits and try to detect the electron, its pattern changes to a bullet-like particle pattern. So is an electron a wave or a particle? Well… it’s both and neither.

Wave-Particle Duality

What we have understood till now is that an electron seems to behave like a way till it gets detected. After detection it behaves like a particle. A workable hypotheses might be to consider an electron (and everything else) as both a wave and a particle. A question arises, though. We already know how to calculate the particle properties of the electron such as momentum ( p = mv ), but if it’s a wave, how do we calculate its wavelength?

Matter Waves

The French Physicist, Louis de Broglie postulated that the wavelength of the ‘matter wave’ associated with a particle (such as an electron, proton or even you, me, the earth, Jupiter and chickens) can be calculated using the following relation:

  • \lambda = \frac{h}{p}

where \lambda is the wavelength of the associated matter wave, p is the momentum and h is what’s called the Planck constant.

Modern Physics: Chapter 2 – Double Slit Experiment II

XKCD – Nerd Sniping

In the last chapter I mentioned that the maxima and minima formed with electrons in the double slit experiment were probability maxima/minima. In fact, the intensity of the wave displayed as the result of the experiment is proportional to the probability of finding the electron at a given position.

Slits Electrons

The wave, in this case, is a function of the position. Let’s call it \psi (x) . Since I \propto A^2 , the probability of finding the electron at a given position x is proportional to |\psi^2(x)|. \psi(x) is called a wavefunction.

One Electron at a Time

If you send one electron at a time, it gets detected at one point on the screen. However, if you keep detecting the positions of the individual electrons coming per unit time and record them, you seen find the same pattern emerging.

Here’s a nice animation to show you what I mean: LINK

Detectors in Front of Slits

If you had detectors in front of the slits (even if the detectors are very gentle), the interference pattern disappears. Surprisingly, as soon as it gets detected at the slits, the electron starts giving the expected bullet-like particle pattern on the screen instead of the wave pattern:

Slits Electrons

Modern Physics: Chapter 1 – Double Slit Experiment I

The results of the double slit experiment challenge the classical concept of the electron being a particle and the concept of nature being divided into particles and waves. Essentially you place a source of whatever you want to conduct the double slit experiment with behind a barrier that only has two narrow slits and then place a detector/screen behind that barrier and record where and when the source gets detected on the screen.

Slits Overview


If you conduct the experiment with bullets, you should get the following result:

Slits Bullets

Where P_{1}(x), P_{2}(x) and P_{12}(x) are the probabilities of finding the particle at a given position x when the first slit is open, the second slit is open and both slits are open respectively. In the case of bullets, it is apparent that:

  • P_{12}(x) = P_{1}(x) + P_{2}(x)

But life isn’t that simple in general. If you conduct the same experiment with waves, you get a somewhat different result.


If you repeat the pattern with waves, you get the following results:

Slits Waves

when I_{1}(x), I_{2}(x) and I_{12}(x) are the intensities of the waves at a given position x when the first slit is open, the second slit is open and both slits are open respectively. Over here,

  • I_{12}(x) is clearly not simply equal to I_{1}(x) + I_{2}(x).

This is because the waves interfere with each other either constructively or destructively at different places forming interference maxima and minima at different points.


Electrons are clearly particles right? The pattern we get by conducting the experiment with electrons will obviously be the same as the one formed by bullets, right? Wrong! When conducting the experiment with electrons, you get a result more like the one we got with waves than the one we got with bullets. Slits Electrons

Interference maxima and minima are formed. Note that unlike the experiment with waves, these are probability maxima/minima, not intensity maxima/minima.

But… electrons were particles, right? Wrong. There’s more to the story than that. To quote Shakespeare,

There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.

~ William Shakespeare – Hamlet

Modern Physics – Introduction

Credits: XKCD

The following is adapted from a lecture by Dr. Sabieh Anwar cited at the end of this post:

Why Study Quantum Physics?

A common question that comes to our mind is: “Why are we studying Modern Physics?” After all, most of us want to become Electrical Engineers because that’s the way the wind is blowing these days. ‘Because that’s where the wind is blowing and we are trying to aimlessly follow the wind.So the question is, in a way, why exactly are non-Physics majors enrolled into this course?’ [translated] The reason for that is that Modern Physics … is one way to look at Nature. Modern Physics has transformed the way we look at Nature. [It] has transformed the way we invent technology. It has transformed our philosophical understanding of our surroundings. So it has transformed our outlook of life. And it’s a very embracing concept … If you look at electronic circuits, almost 75% of the revenue that comes these days in microelectronics is based on devices and inventions that are built on concepts learnt from Quantum Physics …

If we talk about lasers, ‘2010 marked the 50th anniversary of the laser. The first laser was made in 1960. So now we have lasers which are used in DVD-roms and CD players. How do lasers work?’ [translated] What is Silicon? Almost 25% of the Earth’s crust is made of Silicon. Such an abundant material. But why is Silicon so important in the electronic industry? What special features does silicon, or germanium, possess? What is the Big Bang experiment? What are X-Rays? How does diagnostic radiology work? We have a fractured bone. We visit the hospital, and an “X-ray” is performed. How do solar cells work? So all of these are concepts which are vital for an understanding of today’s technology, and an understanding of nature itself. A fundamental understanding of nature.

‘You took courses on Mechanics and Electricity & Magnetism in Freshman year. That was the classical way of looking at Nature.’ [translated] And it’s a very important perspective. With this perspective you can understand a large part of nature. You can understand and decipher how a large number of inventions work. The industrial revolution was based on Mechanics and Heat & Thermodynamics. The entire communications revolution that emerged with the discovery or the invention of radio waves by Heinrich Hertz in the 1890s, that uses concepts of electricity and magnetism. Every one of us carries a cell phone today. You need electricity and magnetism to understand how cell-phones work. Building new cell-phones or optimizing cell-phones. These courses will give you the basics of a large number of devices and concepts in Nature. But, there are certain gaps. The classical picture that was given to you in your first year was incomplete. …. It contains some gaps. There are some things that cannot be explained by it. And now when we’ll study Modern Physics, this will be your first curtain-raiser, your first introduction to non-classical Physics. And classical Physics is a subset of non-classical Physics. If I try to make a diagram:


So what we’ve learnt in the first year is classical Physics. … So now we enter the realm of non-classical Physics which is basically Quantum Mechanics or Quantum Physics. Now this Quantum Physics is a superset of classical Physics. When you look at classical physics, you’re actually looking at average non-classical behavior. So what’s really happening is you have this non-classical realm and you’re averaging this non-classical behavior to observe what is called classical behavior.


– Sabieh Anwar, Lecture 1-A, Modern Physics (2011), School of Science and Engineering, LUMS.

(For oppressed people in idiotic totalitarian countries where youtube is banned (like my country): )

Thoughts on Nuclear Bombs


Moreover, the enemy has begun to employ a new and most cruel bomb, the power of which to do damage is, indeed, incalculable, taking the toll of many innocent lives.   Should we continue to fight, it would not only result in an ultimate collapse and obliteration of the Japanese nation, but also it would lead to the total extinction of human civilization.            ~ Emperor Hirohito

Note: Yes, this post and short and I’ve just shared stuff. You try writing original content a day before a Linear Algebra exam.

How to Fuck Up Like a Boss

My candle burns at both ends;
   It will not last the night;
But ah, my foes, and oh, my friends—
   It gives a lovely light!

~ “First Fig” – Edna St. Vincent Millay

You’re thinking up your next move. Your pieces are in what might be the best possible positions for the situation. You can check mate the opponent in not just one, but several ways. You have it all figured out. You’re going to win this. There’s nothing he can do. You make a move… Turns out the move you made was the one move that allowed the opponent to check mate you with the four pieces he had left in the game. The one sole move that could have converted your victory to defeat. And, out of all the possible moves you could have made, you just had to make that one move.

Has something like that ever happened to you? I’m not just talking about chess (if you thought I was just talking about chess, congratulations, you’re almost as stupid as I am. Look up the term ‘analogy’), has this ever happened to  you in any aspect of your life? At School? At College? In Grad School? Academia? Industry? Marriage? Weekly shopping? Chicken breeding? While banging your head on the wall after watching three hundred and five episodes of Dragon Ball Z in a row? If not, you seem to be living a perfect life. Good for you… (I hope you die).

If this has happened to you, however, you (like me) seem to be an apprentice in the art of royally fucking up. Yes, it’s an art. No normal person can ever fuck up this bad. Fucking up this bad requires genius of the highest order. The thing is, almost anyone can fuck up when one’s already in the worst possible circumstances. But being at the very top of things and then managing to fuck up so ingeniously that you fall right to the very bottom of the darkest most worthless pit requires a prodigious amount of intelligence. Since I’ve been doing this effortlessly for years, I consider myself a pro and am laying out a few easy guidelines for noobs who are looking to follow my footsteps in the sacred art of fucking up like a boss.

Be Annoying

And I mean ANNOYING! Especially to those in authority. Disagree with everything anyone in authority says. Publicly make fun of them. Claim they’re barely qualified and you know more than them. Be especially annoying to the people who handle your financial transactions (pay-checks etc.). Make sure you give them ample reasons to never offer you a raise… then demand a raise…. then claim they’re not giving you a raise because they feel threatened by your talents. If you’re at a college, annoy the instructors. If you’re at a grad school, annoy the supervisors. If you aren’t married, annoy your mom. If you are married, annoy your wife and your mom.  If you’re in industry, annoy your boss. If you’re in academia, annoy your students. If you’re playing a two-player video game, annoy the person playing against you by repeatedly claiming he’s using cheat codes. If you’re playing cricket, annoy the entire team by never accepting the fact that you got out and repeatedly demanding to have another go with the bat.

The rule is perfect: in all matters of opinion our adversaries are insane. ~ Mark Twain

Be Obnoxious

Convince yourself that you are the smartest, most accomplished person alive. Anyone who disagrees is secretly envious of you. You are always right, and by that I mean ALWAYS right. Even if you’re wrong, you’re actually right and the other person just misunderstood you. The largest possible compromise you’re willing to take is accepting that your adversary was right too (as in, you both were right. But, of course, you were more right). Also, you know everything. The facts you quote are always correct. The internet is wrong. Encyclopedias are wrong. Published research papers in prestigious peer-reviewed journals are wrong. Established scientific theories are wrong. Proven mathematical theorems are wrong. You are right, and that’s all that matters.

Be Overconfident

Super-hard test? Screw that! You’re smart! IQ above 3 million! (actual IQ tests claim your IQ is actually below average, but everyone knows they’re incredibly inaccurate, right?). You’ll probably ace it without studying, let’s spend some time showing off how smart you are to less intelligent mortals. What? You failed in the exam? The instructor is probably retarded. Never-mind, you’ll still ace the finals. You’re the smartest person on Earth, after all!