A vector can be an input to a function
A function is a rule that turns an input into an output. The input need not be one number. Suppose an input has two measurements, and , and our rule triples the first and doubles the second:
For the input , the output is . Two numbers went in; one came out.
Store the rule as a vector
The numbers describe how strongly each input contributes. Pair them with the input, multiply corresponding entries, then add:
That operation is the dot product. The expression and the expression describe the same calculation.
For inputs, the pattern is unchanged:
The coefficients are often called weights. A zero weight ignores an input; a negative weight subtracts its contribution.
The rule has a shape
The input lives in a plane. A graph showing the input and the output has three coordinates, . Drawing that graph in 3D does not make the input three-dimensional.
Because this rule only scales and adds, doubling the input doubles the output. Adding two inputs before applying the rule gives the same result as applying it separately and adding the outputs. This is what makes the rule linear.
Try a new input
What does the same rule return for ?
Answer: . The first coordinate contributes nothing this time.
