I was studying circuit theory and electrical networks wherein I came across the theory of superposition and how superposition can be used to figure out voltages/currents in the network, provided the network/circuit is linear. What exactly is a linear circuit? What elements can I have in a linear circuit? Can I have resistors, capacitors(charged and empty), inductors(charged and empty), BJTs (biased and unbiased); diodes(biased and unbiased); any of the above I wish for in my circuit in any configuration and still maintain that my circuit is linear?
A linear circuit obeys the principles of proportionality and superposition.
A linear circuit is an ideal approximation of a real-world physical circuit. All physical circuits have some non-linearity. Linear analysis is useful when the real-world non-linearity is small enough that you get answers that are close enough to your required accuracy.
Ideal resistors, capacitors, and inductors, both energized and not, are linear. Ideal components are those that conform to their simple mathematical models exactly, and in this case that includes superposition.
When signals are large, circuits tend to show more non-linearity. Linear models can be used for transistors and diode over a small range with reasonable accuracy. For example, a voltage of 1mV is often no problem for a good linear range for a transistor. Linear models that take advantage of this are called 'small-signal' models.
To analyze large signals, non-linear transistor and diode models are necessary. For these models, superposition does not apply to the transistor or diode. Linearity still applies to the surrounding linear elements such as resistors.
Resistors are often linear of a huge range of operation. Capacitors can also be linear over a wide range, if they are made from good materials. Air-core inductors have a large linear range, while iron-core inductors have limited range.
One thing that can be a bit confusing is that ideal circuit elements do not exist in the real world. There are always some deviations from the ideal linear equations. These deviations are required by the physics that governs their operation. If you could isolate and connect ideal components, it would be possible to build devices that would not obey all the laws of physics. Therefore these ideal components do not exist in isolation.