How Does A Computer Mouse Work?

When you move a mechanical mouse, the ball rolls beneath it, pushing the two plastic wheels/rollers linked to it in the process. One of those wheels detects side-to-side movement (x-axis wheel) and the other (y-axis wheel) detects movement in the up-and-down direction. An optical mouse uses an LED installed at its bottom to move the cursor around on the screen.

I vividly remember one time when my computer mouse became inoperative. With no alternative at my disposal, I had to depend entirely on the keyboard to get my work done. Not only did it take almost twice as long, but working without a mouse also turned out to be incredibly frustrating! That’s when I first realized the true importance of that tiny thing lying unassumingly beside every 21st-century human’s desktop.

Whenever we want to get anything done on a desktop computer screen, our hands instinctively reach out for the mouse; when you move the mouse on the desk, the pointer on the screen moves in the same pattern with absolute precision. How does this action, which so many of us take for granted, actually happen?

What’s a computer mouse?

The joking comparison of a computer mouse and a real mouse is antiquated, so let’s skip that. A computer mouse, as we all know, is an electronic device (which may or may not be wireless) that helps to move the cursor on a computer screen as you move the mouse over a flat surface. So, a mouse essentially calculates how much you move it in a certain direction (in two dimensions) and subsequently feeds the computer that information to allow for comprehensive control of the graphic user interface.

optical mouse

The species of mice that every computer-geek loves

There are a number of variants of computer mice, including a mechanical mouse, optical and laser mice, a 3D mouse, inertial and gyroscopic mice, the ergonomic mouse, gaming mice and tactile mice, but in this article, we’re going to discuss the two most popular variants among these. So, let’s get started!

Mechanical mouse

A mechanical mouse consists of a heavy rubber ball whose movement makes the cursor move on the screen. Commonly known as the ‘rolling rubber ball’ mouse, it is considerably heavy, thanks to the rubber ball, a few wheels, and a number of other mechanical parts present inside it.

How does a mechanical mouse work?

When you move the mouse, the ball rolls beneath it, pushing the two plastic wheels/rollers linked to it in the process. One of those wheels detects side-to-side movement (x-axis wheel) and the other (y-axis wheel) detects movement in the up-and-down direction. Both of these wheels consist of spokes that ‘break’ a thin light beam inside the mouse. The number of times the beam breaks helps to calculate how far the mouse has moved.

Diagram of mechanical mouse

Internal components of a mechanical mouse

For instance, when you move the mouse straight up, the y-axis wheel turns. The farther up you go, the more the ball pushes the wheel and the more it breaks the light beam. This helps to determine how far the mouse has moved straight up. Similarly, the mouse uses the x-axis wheel to calculate side-to-side movement. When the mouse is moved at an angle, the calculations obtained from the movement of both of these wheels are used.

Mechanical mice were quite popular in the past decade, but due to their clunkier design and relatively lessened durability, they were quickly replaced by optical mice.

Optical mouse

An optical mouse is technologically much more advanced than a mechanical mouse. Unlike the latter, an optical mouse is completely electronic and therefore has no moving parts. It consists of an LED (that generates the signature red light), a light-detector chip, a switch mechanism and a few other simple components. Some mice have another LED that lights up a plastic strip installed at the back of the mouse as an indication of the mouse’s operation.

How does an optical mouse work?

Bottom view of an optical mouse

An optical mouse kept upside down

The LED installed at the bottom of the mouse emits a bright light in the downward direction. Since a mouse is usually used on plain surfaces, the light bounces back from the surface and enters a photocell that’s also mounted on the bottom, almost next to the LED. This photocell has a frontal lens that magnifies any light reaching it. As you move the mouse around, the pattern of the reflected beam changes; this is then used by the light-detector chip to figure out how and in which direction you’re moving the mouse.

Optical mice are much lighter and faster than mechanical ones, and have therefore gained enormous popularity all over the world. With improvements in technology, newer and even more advanced mice – that address issues like ergonomics and the health of the user – are taking center stage. The choice of the right variant rests with the user, but one thing remains universally true – computers and mice shall always remain inseparable.


  2. A paper by Xerox
  3. An MIT paper by Franck Dernoncourt
The short URL of the present article is:
Help us make this article better
About the Author:

Ashish is a Science graduate (Bachelor of Science) from Punjabi University (India). He spends a lot of time watching movies, and an awful lot more time discussing them. He likes Harry Potter and the Avengers, and obsesses over how thoroughly Science dictates every aspect of life… in this universe, at least.

Science ABC YouTube Videos

  1. Toxoplasmosis : Can Your Cat Make You Go Crazy?
  2. Photosynthesis: How Plants Make Their Food?
  3. How Does A Helicopter Work: Everything You Need To Know About Helicopters
  4. Rigor Mortis, Livor Mortis, Pallor Mortis, Algor Mortis: Forensic Science Explains Stages of Death
  5. Why Is Space Cold If There Are So Many Stars?
  6. Tensor Tympani Sound: Why Do You Hear A Rumbling Sound When You Close Your Eyes Too Hard?
  7. Hawking Radiation Explained: What Exactly Was Stephen Hawking Famous For?
  8. Current Vs Voltage: How Much Current Can Kill You?