This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
converting_between_slope_intercept_and_standard_form.html
120 lines (115 loc) · 4.62 KB
/
converting_between_slope_intercept_and_standard_form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html data-require="math math-format expressions graphie">
<head>
<meta charset="UTF-8" />
<title>Converting between slope intercept and standard form</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="standard-to-slope">
<div class="vars">
<var id="A">randRangeNonZero( -5, 5 )</var>
<var id="B">randRangeNonZero( -5, 5 )</var>
<var id="C">randRangeNonZero( -5, 5 )</var>
<var id="SLOPE">-1 * A / B</var>
<var id="Y_INTERCEPT">C / B</var>
</div>
<p class="question">Convert the following equation from standard form to slope intercept form.</p>
<p>In other words, if the equation is rewritten to look like <code>y = mx + b</code>, what are the values of <code>m</code> and <code>b</code>?</p>
<p><code><var>expr([ "*", A, "x"])</var> + <var>expr([ "*", B, "y" ])</var> = <var>C</var></code></p>
<div class="solution" data-type="multiple">
<p><code>m</code> = <span class="sol"><var>SLOPE</var></span></p>
<p><code>b</code> = <span class="sol"><var>Y_INTERCEPT</var></span></p>
</div>
<div class="hints">
<div>
<p>Move the <code>x</code> term to the other side of the equation.</p>
<p><code><var>expr([ "*", B, "y" ])</var> = <var>expr([ "*", -1 * A, "x"])</var> + <var>C</var></code></p>
</div>
<div data-if="B !== 1">
<p>Divide both sides by <code><var>B</var></code>.</p>
<p><code>y = <span data-if="abs( SLOPE ) !== 1"><var>fractionReduce( -1 * A, B)</var></span><span data-if="SLOPE === -1">-</span>x + <var>fractionReduce( C, B )</var></code></p>
</div>
<div>
<p>Inspecting the equation in slope intercept form, we see the following.</p>
<p><code>\begin{align*}m &= <var>fractionReduce( -1 * A, B)</var>\\
b &= <var>fractionReduce( C, B )</var>\end{align*}</code></p>
</div>
<div>
<p>Behold! The magic of math, that both equations could represent the same line!</p>
<div class="graphie" id="grid">
graphInit({
range: 10,
scale: 20,
axisArrows: "<->",
tickStep: 1,
labelStep: 1
});
style({ stroke: BLUE, fill: BLUE });
plot(function( x ) {
return x * SLOPE + Y_INTERCEPT;
}, [ -10, 10 ]);
</div>
</div>
</div>
</div>
<div id="slope-to-standard">
<div class="vars">
<var id="SLOPE">randRange( -3, 3 )</var>
<var id="Y_INTERCEPT">randRangeNonZero( -3, 3 )</var>
<var id="A">SLOPE <= 0 ? -1 * SLOPE : SLOPE</var>
<var id="B">SLOPE <= 0 ? 1 : -1</var>
<var id="C">SLOPE <= 0 ? Y_INTERCEPT: -1 * Y_INTERCEPT</var>
</div>
<p class="question">Convert the following equation from slope intercept form to standard form.</p>
<p>In other words, if the equation is rewritten to look like <code>Ax + By = C</code>, what are the values of <code>A</code>, <code>B</code>, and <code>C</code>?</p>
<p>Assume <code>A</code> is positive.</p>
<p><code>y = <var>expr([ "+", [ "*", SLOPE, "x" ], Y_INTERCEPT ])</var></code></p>
<div class="solution" data-type="multiple">
<p><code>A</code> = <span class="sol"><var>A</var></span></p>
<p><code>B</code> = <span class="sol"><var>B</var></span></p>
<p><code>C</code> = <span class="sol"><var>C</var></span></p>
</div>
<div class="hints">
<div data-if="SLOPE !== 0">
<p>Move the <code>x</code> term to the same side as the <code>y</code> term.</p>
<p><code><var>expr([ "*", -SLOPE, "x" ])</var> + y = <var>Y_INTERCEPT</var></code></p>
</div>
<div data-else>
<p>Since the slope is <code>0</code> and there is no <code>x</code> term, the equation is already in slope intercept form.</p>
<p><code>y = <var>Y_INTERCEPT</var></code></p>
</div>
<div data-if="SLOPE > 0">
<p>Multiply both sides by <code>-1</code> so that <code>A</code> will be positive</p>
<p><code><var>expr([ "*", SLOPE, "x" ])</var> - y = <var>-Y_INTERCEPT</var></code></p>
</div>
<div>
<p>Inspecting the equation in standard form, we see the following.</p>
<p><code>\begin{align*}A &= <var>A</var>\\
B &= <var>B</var>\\
C &= <var>C</var>\end{align*}</code></p>
</div>
<div>
<p>Behold! The magic of math, that both equations could represent the same line!</p>
<div class="graphie" id="grid">
graphInit({
range: 10,
scale: 20,
axisArrows: "<->",
tickStep: 1,
labelStep: 1
});
style({ stroke: BLUE, fill: BLUE });
plot(function( x ) {
return x * SLOPE + Y_INTERCEPT;
}, [ -10, 10 ]);
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>