ELI5: Explain Like I'm 5

Linear function

A linear function is like a magic machine that takes a number and does some special operations (or steps) that always give you a predictable result.

Imagine you have a box with a little lever on it. You put a number into the box, then you pull the lever. The box does a special operation that takes the number and multiplies it by another number. Then it adds or subtracts some amount, depending on what you want. After all these steps, the box spits out a new number.

The special rule that takes your input number and turns it into a new output number is called a linear function. The word "linear" just means that the rule involves multiplying and adding or subtracting, rather than more complicated operations like square roots or trigonometry.

For example, let's say we have a linear function that multiplies a number by 2 and then adds 3. If we put the number 5 into the box, the operation would work like this:

5 --> [multiply by 2] --> 10 --> [add 3] --> 13

So, the output number (or result) is 13. We can check that this always works by trying some other input numbers:

- If we put in 0, we get 3 (because 0 times 2 plus 3 is 3)
- If we put in -4, we get -5 (because -4 times 2 plus 3 is -5)

That's pretty much it for linear functions! They're just a fancy way of turning one number into another number using multiplication, addition, and/or subtraction. The only tricky part is figuring out what the specific rule is for each function.