Linearity

Examples in physics include the linear relationship of voltage and current in an electrical conductor (Ohm's law), and the relationship of mass and weight.

By contrast, more complicated relationships, such as between velocity and kinetic energy, are nonlinear.

This is potentially confusing, but usually the intended meaning will be clear from the context.

The word linear comes from Latin linearis, "pertaining to or resembling a line".

In this definition, x is not necessarily a real number, but can in general be an element of any vector space.

When a differential equation can be expressed in linear form, it can generally be solved by breaking the equation up into smaller pieces, solving each of those pieces, and summing the solutions.

In a different usage to the above definition, a polynomial of degree 1 is said to be linear, because the graph of a function of that form is a straight line.

[2] Over the reals, a simple example of a linear equation is given by: where m is often called the slope or gradient, and b the y-intercept, which gives the point of intersection between the graph of the function and the y-axis.

A Boolean function is linear if one of the following holds for the function's truth table: Another way to express this is that each variable always makes a difference in the truth value of the operation or it never makes a difference.

Negation, Logical biconditional, exclusive or, tautology, and contradiction are linear functions.

In contrast, human senses are highly nonlinear: for instance, the brain completely ignores incoming light unless it exceeds a certain absolute threshold number of photons.

Linear motion traces a straight line trajectory.

In electronics, the linear operating region of a device, for example a transistor, is where an output dependent variable (such as the transistor collector current) is directly proportional to an input dependent variable (such as the base current).

This ensures that an analog output is an accurate representation of an input, typically with higher amplitude (amplified).

In most scientific and technological, as distinct from mathematical, applications, something may be described as linear if the characteristic is approximately but not exactly a straight line; and linearity may be valid only within a certain operating region—for example, a high-fidelity amplifier may distort a small signal, but sufficiently little to be acceptable (acceptable but imperfect linearity); and may distort very badly if the input exceeds a certain value.

In each case, linearity defines how well the device's actual performance across a specified operating range approximates a straight line.

Linearity is usually measured in terms of a deviation, or non-linearity, from an ideal straight line and it is typically expressed in terms of percent of full scale, or in ppm (parts per million) of full scale.

Typically, the straight line is obtained by performing a least-squares fit of the data.

The three definitions vary in the manner in which the straight line is positioned relative to the actual device's performance.

Also, all three of these definitions ignore any gain, or offset errors that may be present in the actual device's performance characteristics.

Hasse diagram of a linear Boolean function