The discovery of the electron is attributed to J.J. Thomson, a British physicist, in 1897. Thomson conducted a series of experiments to investigate the nature of cathode rays, which are streams of negatively charged particles that flow from the negative electrode (cathode) to the positive electrode (anode) in a vacuum tube.
Thomson used cathode ray tubes, which are sealed glass tubes containing electrodes at either end, and he observed that the rays produced in these tubes were deflected by electric and magnetic fields. By measuring the deflection of the rays under different conditions, Thomson was able to determine the charge-to-mass ratio of the particles within the cathode rays.
Based on his experiments and calculations, Thomson concluded that these particles, which he called "corpuscles" but are now known as electrons, possessed a negative charge and were significantly smaller and lighter than atoms. This discovery led to a major revision of the prevailing model of the atom, known as the "plum pudding" model, and laid the foundation for our understanding of atomic structure and the development of modern atomic theory.