Basics of Computer Mathematics: Relationship between Slope and Intercept, Derivative, Weight

This part belongs to middle school knowledge, which is the basis of calculus, neural network, color theory, and computer graphics. I hope it can help you wake up the memory in your heart

slope

The slope refers to the ratio of y to x in the coordinate system, that is, tan(a), which represents the slope of a straight line. The function of the slope is to establish the connection between the independent variable and the variable, so as to realize the derivation operation of the variable.

The derivation process of slope k:
k = tan ( α ) = △ y △ x = y 2 − y 1 x 2 − x 1 ory 1 − y 2 x 1 − x 2 k= tan(\alpha) = \frac{\ triangle y} {\triangle x} = \frac{y2-y1}{x2-x1 } or \frac{y1-y2}{x1-x2}k=t a n ( a )=xy=x2 _x 1y 2y 1orx 1x2 _y 1y 2
Application:
Let the straight line l in the coordinate system pass through the point p1(x1,y1) and point p2(x2,y2),
1 firstly calculate the slope k: k = y 1 / x 1 ; 1 firstly calculate the slope k: k = y1/x1;1 Find the slope k first : k=y 1 / x 1 ;
2 Then plug in the value of x 2 to get y 2 = kx 2 ; 2 Then plug in the value of x2 to get y2 = kx2;2 then plug in the value of x 2 to get y 2=k x 2 ;

intercept

The intercept of a straight line is divided into transverse intercept and longitudinal intercept. The transverse intercept is the abscissa of the intersection of the line and the X axis, and the vertical intercept is the ordinate of the intersection of the line and the Y axis. To ask for the transverse intercept, you only need to set Y=0 to find X, and to find the vertical intercept, you only need to set X=0 to find Y. Such as y=x-1, the transverse intercept is 1, and the longitudinal intercept is -1. The line intercept can be positive, negative, or 0.

The relationship between slope and derivative

The derivative, in a certain sense, is the slope of the two points that make up the line as the distance tends to zero. His role is to predict the position, tangent and normal of adjacent points based on the derivative of a certain point.

Weights in Neural Networks

The w weight in the neural network is equivalent to the slope k in the slope intercept formula, and the compensation e is equivalent to the intercept b in the slope intercept formula

Several Forms of Expression of Straight Line Equation Straight Line

1 point slope

Suitable for knowing the coordinates of a point and the slope of the line,
the formula:
k = y 1 − y 2 x 1 − x 2 k = \frac{y1 - y2}{x1-x2}k=x 1x2 _y 1y 2
y 1 − y 2 = k ( x 1 − x 2 ) y1-y2 = k(x1-x2) y 1y 2=k ( x 1x 2 )
application:
set points p1(1,2) and p2(2,y2), and find y2
into the formula: (2 - y2) = 2/1(1-2)
= y2 = 2 - (2* - 1) = 4
y1, y2 can also be adjusted:
y2 - 2 = 2/1(2-1)
y2 = 2 + 2
y2 = 4

2 oblique intercept

Known slope k and axial intercept b, formula:
y = kx + by= kx+by=kx+b
application:
set point slope k = 2, intercept b = 0, x = 2, find y
into the formula: y = 2(2) + 0 = 5

3 two-point

Given two points (x1, y1), (x2, y2):
x − x 1 x 2 − x 1 = y − y 1 y 2 − y 1 \frac{x-x1}{x2-x1} = \frac {y-y1}{y2-y1}x2 _x 1xx 1=y 2y 1yy 1
Application:
Set point (0,0) and point (1,2), (2,y2), find y2
(0-1) / (2-1) = (0-2) / (y2 - 2)
-1 /1 = -2/ (y2 -2)
-1 = -2/y2 + 1
y2 = -2(-1 - 1) = 4

4 intercept

It is known that the intercepts a and b corresponding to a certain point x and y are
xa + yb = 1 \frac{x}{a}+\frac{y}{b}=1ax+by=1
Application:
straight line equation: y = 2x + 1, assuming that the value of x is 2, to find y,
first find the solution of x and y, and get the x and y of the equation to be 0,
then the intercept of x == 0 = 2x +1 = -1/2 = -0.5
, then the intercept b of y == y = 2*0+1 = 1
is brought into the intercept formula to get:
2/-0.5 + y/1 == 1 = -4 + y == y = 5
and the slope intercept holds

Guess you like

Origin blog.csdn.net/lengyoumo/article/details/111306883