In microwave and radio-frequency engineering, a stub or resonant stub is a length of transmission line or waveguide that is connected at one end only. The free end of the stub is either left open-circuit, or short-circuited (as is always the case for waveguides). Neglecting transmission line losses, the input impedance of the stub is purely reactive; either capacitive or inductive, depending on the electrical length of the stub, and on whether it is open or short circuit. Stubs may thus function as capacitors, inductors and resonant circuits at radio frequencies.