how do i find a pseudocode to find the slope and y-intercept of a line?
145872
You don't need much "pseudo code" because the\ncalculation is just an application of "Y = MX + B". \n\nThe slope, M, is just "rise over run" \n\n    (x2-x1) / (y2-y1)\n\nOnce you have that, you can solve the original\nequation for the y intercept, B:\n\n    Y = MX + B\n    Y - MX = B\n\n    B = Y - MX\n\nIn order to avoid the infinity caused by a vertical\nline, your pseudo code should probably check for \ndivision by zero.\n\n\ncompute(float x1, float x2, float y1, float y2)\n{\n    float slope     = (x2-x1)/(y2-y1);\n\n    float intercept = y2 - slope*x2;\n}
498526
The value of y at the y-intercept (b), which is the point at which the line intersects the y-axis, is -9, and the slope (m) is -3. Following, the y=mx+b or slope-intercept form, the equation is y=-3x-9.
896230
the y coordinates are the same i.e. -1, \nso the line is parallel to the x axis and passes through -1 on the y axis.\nits slope is parallel to the x axis.
749030
y = m (x-x1) + y1\nm=slope (so m=2)\nx1 and y1 are the coordinates. Just plug your numbers in and expand the m(x-x1) part.
937748
there are a couple of ways to do this, but I think the easiest is to find the slope and since you know the y-intercept, use that formula.\n\nm= (-4-0)/(0-12)\n\nm=-4/-12\nm=1/3\n\ny=(1/3)x -4
813674
To find the y intercept make x equal 0 then solve the equation. You can then work out the x intercept by making y equal 0. This will allow you to plot the line and work out the gradient/slope by using rise divided by run. Alternatively, rearrange the equation to make y the subject. I believe the slope would be -1/4. This would be y=-1/4x+8.
911563
Here's 2 examples:\n\n1.) Given point (2,2) and (3,3), find the function.\nStep 1: Find the slope.\nSlope = rise/run = (y2 - y1) / (x2 - x1) \n(3 - 2) / (3 - 2) = 1/1 = 1.\n\nStep 2: Given the slope, find the y intercept by trying to find a point (0, y) that fits the 2 points above, and the slope given.\nUse the slope formula: rise / run = 1\n(2 - y) / (2 - 0) = 1 = (2 - y) / 2 \n2 = 2 - y\n-y = 0\ny = 0\ny intercept = 0, 0\n\nStep 3: Once you have the slope, you can write it in slope intercept form:\ny = mx + b \nm = slope, b = y intercept\ny = 1x + 0, or y = x.\n\n2.) (a harder one) Given point (1,4) and (-3, 2), find the function.\nStep 1: Find the slope.\nm = rise/run = (y2 - y1) / (x2 - x1) \n(4 - 2) / (1 - -3) = 2/4 = 1/2 = .5\n\nStep 2: Given the slope, find the y intercept at (0, y)\nm = rise / run = 1/2\n(4 - y) / (1 - 0) = 1/2 = (4 - y) / 1 \n4 - y = 1/2\n-y = -3.5\ny = 3.5\ny intercept = 0, 3.5\n\nStep 3: Write it in slope intercept form:\ny = mx + b \ny = .5x + 3.5
826422
Find the slope of the line that connects those points.
653148
All equations for a line will have the form:\n\ny = mx + b,\n\nwhere x & y are coordinates, m is your slope, and b is your y-intercept.\n\nTherefore, substituting in your slope and y intercept, you get:\n\ny = -2/3x + 4\n\nThis equation can then be used to graph the line, since given any x, the corresponding y can be found. :)
809436
That means put zero for x and see what y is (the y-intercept), then put zero for y and see what x is (the x-intercept).\n\nDraw the two intercepts and draw a line through them.
771247
for these you need to find the x and y intercepts(the point at which the line crosses the x axis is the x-intercept, and and the point at which the line crosses the y axis is the y-intercept), and then connect the two points to form a line. (you do this for every line.)\n\nfor example: x-y=8. <<is in the Ax+By=C form, where A, B, and C are coefficients\n             to find the x intercept, you put C over A or C/A. in this case it is 8/1=8. That is your x intercept. for the y intercept you put C over B or C/B--in this case  it is 8/-1 or -8. You graph that on a coordinate plane. You connect the two points and get the line x-y=8.\n\n\nYou do the same thing for line 2x+y=7. Your x-intercept is 7/2 and your y-intercept is 7/1 or 7. When you connect those two points and graph that line, there will be a point where those two lines intercect. Find the coordinates of that point and that is your solution.  \n\n\ntry the next one on your own, and you'll get it!!! once you find the x- and y-intercepts it's a piece of cake. good luck!!! need any more help, email me.
953419
The slope intercept form of the line is \n\ny = mx + b where m = slope and b = y-intercept\n\nSince (5, -3) lies on the line then\n\n-3 = 5m + b\n\nie 5m + b - 3 = o\n\nSo any line in which m = (3 - b)/5\n\neg b = -2, m = 1 So y = x - 2\nb = 8, m = -1 So y = 8 - x ....... and so forth\n\nGraphing m against b would give all the values of m, b that satisfy the given condition.
542210
Solve for y: y=3x\n\nThe slope is 3, and the y-intercept is (0,0). (y=mx+b: m is slope, b is y-intercept)\n\nThe slope is the change of y over the change of x.\n\nStart from (0,0) and go up 3 units, right 1 unit.  Connect the points and continue the line.
615215
sure...here are 2\n\nThe slope-intercept equation for a line\ny = mx + b\ny=the y part of a point given any x value\nm=slope of the line\nx=the x part of the point given y, or just given x to find y\nb=y intercept, the point at which the line crosses teh y axis, or (0,y)\n\nanother equation is\nPythagorean Theorem \na^2 +b^2 = c^2\na, b, c are sides of a triangle, c is the longest side (the hypotenuse)\nthis formula only works in right triangles\n\nhope this helps\nmatttlocke
831150
The slope-intercept form of an equation makes it very easy to graph the equation.\n\nYou say you already understand the rise over the run...that's m in the formula, the number in front of x.\n\nb is the y-intercept.  This is the value of y where the line crosses the y-axis, i.e., where x=0.\n\nSo, given an equation that looks like y=mx + b, for example\n\ny = 2x + 7\n\nTo graph the equation, first you mark the y-intercept, which would be (0, 7) in this case, and then you go up 2 (rise) and to the right 1 (run), and mark the point (1,9), which is (0+1,2+7).  Then draw a line through those two points and you're done.
1090932
If you plot those two lines, the solution is the place where they cross each other (if they do)... but.. let's set them up in Slope-Intercept form:  y = mx + b, where m is the slope and b is the y-intercept.\n\n-6x - 7y = 65 ==> y = -(6x +65)/7 ==> y = -(6/7)x - 65/7\n\n4x + 3y = -35 ==> y = (-4x -35)/3 ==> y = -(4/3)x - 35/3\n\nsince the slopes are different, the lines WILL cross and there is only 1 solution (if they had been the same slope then either there would have been no solution or infinite solutions)\n\none way to find the solution.. \n\n-6x -7y = 65 ==> multiply equation by 2 ==> -12x -14y = 130\n4x + 3y = -35 ==> multiply equation by 3 ==> 12x + 9y = -105\nnow add the two equations to eliminate x ==> 0x -5y = 25\nor... solving -5y = 25 for y... you get y = -5\n\nnow plug this value into one of the equations and solve for x:\n\n4x + 3(-5) = -35 ==> 4x - 15 = -35 ==> 4x = -20 ==> x = -5\n\nso your solution is (-5, -5)
247082
Yes because to find slope you need change in y and change in x (or whatever coordinate system you use).\n\nSince you have both two x's and two y's then you're set.\n\nUse this formula: Δy/Δx where Δ stands for "change in" or (y1 - y2)/(x1 - x2)\n\nUsing the coordinates listed:\n(-2 - -2)/(6 - -8)=\n(-2 + 2)/(6 + 8)=\n(0)/(14)\n\nSince '0' divided by anything is zero, your slope is zero.\n\nThis would be a line that is parallel to the x axis 2 units below the axis.