Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Linear Functions

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

Linear Functions

A 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

xyy = x
11y = x = 1
22y = x = 2
33y = x = 3
44y = x = 4
55y = x = 5

Results from f(x) = 2x

xyy = 2x
12y = 2x = 2
24y = 2x = 4
36y = 2x = 6
48y = 2x = 8
510y = 2x = 10


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.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.