# AI – Linear Functions

## Linear Functions

• Linear means straight
• linear function is a straight line
• linear graph represents a linear function

## Linear Functions

Function is special relationship where each input has an output.

A function is often written as f(x) where x is the input:

Results from f(x) = x

Results from f(x) = 2x

## Linear Equations

A Linear Equation is an equation for a straight line:

• y = x
• y = x*2
• y = x*2 + 7
• y = ax + b
• 5x = 3y
• y/2 = 6

## Non-Linear Equations

A Linear Equation can NOT contain exponents or square roots:

• y = x**2
• y = Math.sqrt(x)
• y = Math.sin(x)

## Linear Regression

A Linear regression tries to model the relationship between two variables by fitting a linear graph to data.

One variable (x) is considered to be data, and the other (y) is considered to be dependent.

For example, a Linear Regression can be a model to relate the price of houses to their size.

## Linear Least Squares

Linear algebra is used to solve Linear Equations.

Linear Least Squares (LLS) is a set of formulations for solving statistical problems involved in Linear Regression.