This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
line_relationships.html
268 lines (256 loc) · 16.4 KB
/
line_relationships.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html data-require="math math-format expressions graphie">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Line relationships</title>
<script src="../khan-exercise.js"></script>
<style type="text/css">
#answer_area input[type=text] {
width: 40px;
}
</style>
</head>
<body>
<div class="exercise">
<div class="vars"></div>
<div class="problems">
<div id="perpendicular-graph" data-weight="2">
<div class="vars">
<var id="M">randRangeNonZero( -3, 3 ) / randRange( 1, 3 )</var>
<var id="M_SIGN">M > 0 ? "" : "-"</var>
<var id="M_PERP_SIGN">M > 0 ? "-" : ""</var>
<var id="M_FRAC">decimalFraction( M, "true", "true" )</var>
<var id="M_PERP_FRAC">decimalFraction( -1 / M, "true", "true" )</var>
<var id="B">randRange( -5, 5 )</var>
<var id="X" data-ensure="abs( ( -1 / M ) * X ) <= 12">randRange( 2, 8 ) * randRangeNonZero( -1, 1 )</var>
<var id="Y" data-ensure="abs( Y - ( -1 / M ) * X ) < 10">randRange( 2, 8 ) * randRangeNonZero( -1, 1 )</var>
<var id="LINE_TYPE">"perpendicular"</var>
</div>
<div class="question">
<p><b>Find the slope and y-intercept of the line that is <code>\color{<var>GREEN</var>}{\text{<var>LINE_TYPE</var>}}</code> to <code>\enspace \color{<var>BLUE</var>}{y = <span data-if="abs( M_FRAC ) !== 1"><var>M_FRAC</var></span><span data-else><var>M_SIGN</var></span>x <span data-if="B !== 0">+ <var>B</var></span>}\enspace</code> and passes through the point <code>\color{red}{(<var>X</var>, <var>Y</var>)}</code>.</b></p>
<div class="graphie" id="grid">
graphInit({
range: [[-10, 10], [-10, 10]],
scale: [18, 18],
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
axisArrows: "<->"
});
plot(function( x ) {
return ( M * x + B );
}, [-10, 10], {
stroke: BLUE
});
circle( [X, Y], 1/4, {
stroke: "none",
fill: "#ff0000"
} );
</div>
</div>
<div class="solution" data-type="multiple">
<p><code>m</code> = <span class="sol"><var>-1 / M</var></span></p>
<p><code>b</code> = <span class="sol"><var>Y - ( -1 / M * X )</var></span></p>
</div>
<div class="hints">
<p>Lines are considered perpendicular if their slopes are negative reciprocals of each other.
<div>
<p>The slope of the blue line is <code>\color{<var>BLUE</var>}{<var>M_FRAC</var>}</code>, and its negative reciprocal is <code>\color{<var>GREEN</var>}{<var>M_PERP_FRAC</var>}</code>.</p>
<p>Thus, the equation of our perpendicular line will be of the form <code>\enspace \color{<var>GREEN</var>}{y = <span data-if="abs( M_PERP_FRAC ) !== 1"><var>M_PERP_FRAC</var></span><span data-else><var>M_PERP_SIGN</var></span>x + b}\enspace</code>.</p>
</div>
<div>
<p>We can plug our point, <code>(<var>X</var>, <var>Y</var>)</code>, into this equation to solve for <code>\color{<var>GREEN</var>}{b}</code>, the y-intercept.</p>
<p data-if="M !== -1"><code><var>Y</var> = \color{<var>GREEN</var>}{<span data-if="abs( M_PERP_FRAC ) !== 1"><var>M_PERP_FRAC</var></span><span data-else><var>M_PERP_SIGN</var></span>}(<var>X</var>) + \color{<var>GREEN</var>}{b}</code></p>
</div>
<div>
<p><code><var>Y</var> = <var>decimalFraction( -1 / M * X, "true", "true" )</var> + \color{<var>GREEN</var>}{b}</code></p>
<p><code><var>Y</var> - <var>decimalFraction( -1 / M * X, "true", "true" )</var> = \color{<var>GREEN</var>}{b} = <var>decimalFraction( Y - ( -1 / M * X ), "true", "true" )</var></code></p>
</div>
<div>
<p>The equation of the perpendicular line is <code>\enspace \color{<var>GREEN</var>}{y = <span data-if="abs( M_PERP_FRAC ) !== 1"><var>M_PERP_FRAC</var></span><span data-else><var>M_PERP_SIGN</var></span>x<span data-if="Y - ( -1 / M * X ) !== 0"> + <var>decimalFraction( Y - ( -1 / M * X ), "true", "true" )</var></span>}\enspace</code>.</p>
<p><code>\color{<var>GREEN</var>}{m = <var>decimalFraction( -1 / M, "true", "true" )</var>, \enspace b = <var>decimalFraction( Y - ( -1 / M * X ), "true", "true" )</var>}</code></p>
<div class="graphie" data-update="grid">
plot(function( x ) {
return ( -1 / M * x + ( Y - ( -1 / M * X ) ) );
}, [-10, 10], {
stroke: GREEN
});
</div>
</div>
</div>
</div>
<div id="parallel-graph" data-type="perpendicular-graph" data-weight="2">
<div class="vars">
<var id="LINE_TYPE">"parallel"</var>
<var id="X" data-ensure="abs( M * X ) <= 12">randRange( 2, 8 ) * randRangeNonZero( -1, 1 )</var>
<var id="Y" data-ensure="abs( Y - M * X ) < 10 && abs( Y - M * X - B ) >= 1">randRange( 2, 8 ) * randRangeNonZero( -1, 1 )</var>
</div>
<div class="solution" data-type="multiple">
<p><code>m</code> = <span class="sol"><var>M</var></span></p>
<p><code>b</code> = <span class="sol"><var>Y - M * X </var></span></p>
</div>
<div class="hints">
<div>
<p>Parallel lines have the same slope.</p>
<p>The slope of the blue line is <code>\color{<var>BLUE</var>}{<var>M_FRAC</var>}</code>, so the equation of our parallel line will be of the form <code>\enspace \color{<var>GREEN</var>}{y = <span data-if="abs( M_FRAC ) !== 1"><var>M_FRAC</var></span><span data-else><var>M_SIGN</var></span>x + b}\enspace</code>.</p>
</div>
<div>
<p>We can plug our point, <code>(<var>X</var>, <var>Y</var>)</code>, into this equation to solve for <code>\color{<var>GREEN</var>}{b}</code>, the y-intercept.</p>
<p data-if="M !== 1"><code><var>Y</var> = \color{<var>GREEN</var>}{<span data-if="abs( M_FRAC ) !== 1"><var>M_FRAC</var></span><span data-else><var>M_SIGN</var></span>}(<var>X</var>) + \color{<var>GREEN</var>}{b}</code></p>
</div>
<div>
<p><code><var>Y</var> = <var>decimalFraction( M * X, "true", "true" )</var> + \color{<var>GREEN</var>}{b}</code></p>
<p><code><var>Y</var> - <var>decimalFraction( M * X, "true", "true" )</var> = \color{<var>GREEN</var>}{b} = <var>decimalFraction( Y - M * X, "true", "true" )</var></code></p>
</div>
<div>
<p>The equation of the parallel line is <code>\enspace \color{<var>GREEN</var>}{y = <span data-if="abs( M_FRAC ) !== 1"><var>M_FRAC</var></span><span data-else><var>M_SIGN</var></span>x<span data-if="Y - ( M * X ) !== 0"> + <var>decimalFraction( Y - M * X, "true", "true" )</var>}</span>\enspace</code>.</p>
<p><code>\color{<var>GREEN</var>}{m = <var>decimalFraction( M, "true", "true" )</var>, \enspace b = <var>decimalFraction( Y - M * X, "true", "true" )</var>}</code></p>
<div class="graphie" data-update="grid">
plot(function( x ) {
return ( M * x + ( Y - M * X ) );
}, [-10, 10], {
stroke: GREEN
});
</div>
</div>
</div>
</div>
<div id="compare-lines" data-ensure="abs( A1 ) !== abs( B1 ) && abs( A2 ) !== abs( B2 )" data-weight="0">
<div class="vars">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
<var id="C1">randRangeNonZero( -5, 5 )</var>
<var id="F">randRangeNonZero( -5, 5 )</var>
<var id="A2">A1 * F</var>
<var id="B2">B1 * F</var>
<var id="C2">C1 * F</var>
<var id="EQ1">expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var>
<var id="EQ2">expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var>
</div>
<div class="question">
<p>What do the following two equations represent?</p>
<p><code><var>EQ1</var></code></p>
<p><code><var>EQ2</var></code></p>
</div>
<div class="solution">Equivalent lines</div>
<ul class="choices" data-category="true">
<li>Equivalent lines</li>
<li>Parallel lines</li>
<li>Perpendicular lines</li>
<li>None of the above</li>
</ul>
<div class="hints">
<div>
<div class="graphie" id="grid">
init({
range: [[-10, 10], [-10, 10]],
scale: [20, 20]
});
grid( [-10, 10], [-10, 10], {
stroke: "#ccc"
});
style({
stroke: "#888",
strokeWidth: 2,
arrows: "->"
});
path( [ [-10, 0], [10, 0] ] );
path( [ [0, -10], [0, 10] ] );
style({
stroke: "#6495ED",
arrows: null
});
plot( function( x ) {
return ( C1 / B1 ) - ( A1 / B1 ) * x;
}, [-10, 10]);
</div>
<p>Putting the first equation in <code>y = mx + b</code> form gives:</p>
<p><code><var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var></code></p>
<p><code><var>expr(["*", B1, "y"]) + " = " + expr(["+", ["*", (-1 * A1), "x"], C1])</var></code></p>
<p data-if="B1 !== 1"><code><var>"y = " + fractionReduce( -A1, B1 ) + "x + " + fractionReduce( C1, B1 )</var></code></p>
</div>
<div>
<div class="graphie" data-update="grid">
plot( function( x ) {
return ( C2 / B2 ) - ( A2 / B2 ) * x;
}, [-10, 10]);
</div>
<p>Putting the second equation in <code>y = mx + b</code> form gives:</p>
<p><code><var>expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var></code></p>
<p><code><var>expr(["*", B2, "y"]) + " = " + expr(["+", ["*", (-1 * A2), "x"], C2])</var></code></p>
<p data-if="B2 !== 1"><code><var>"y = " + fractionReduce( -A2, B2 ) + "x + " + fractionReduce( C2, B2 )</var></code></p>
</div>
</div>
</div>
<div id="different-lines" data-type="compare-lines">
<div class="vars" data-ensure="A1 / B1 !== A2 / B2 && A1 / B1 !== -B2 / A2">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="A2">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
<var id="B2">randRangeNonZero( -5, 5 )</var>
<var id="C1">randRangeNonZero( -5, 5 )</var>
<var id="C2">randRangeNonZero( -5, 5 )</var>
<var id="EQ1">expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var>
<var id="EQ2">expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var>
</div>
<div class="solution">None of the above</div>
<div class="hints" data-apply="appendContents">
<p>The slopes are not the same, so the lines are not equivalent or parallel. The slopes are not negative inverses of each other, so the lines are not perpendicular. The correct answer is none of the above.</p>
</div>
</div>
<div id="same-line" data-type="compare-lines">
<div class="vars">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
<var id="C1">randRangeNonZero( -5, 5 )</var>
<var id="F">randRangeNonZero( -5, 5 )</var>
<var id="A2">A1 * F</var>
<var id="B2">B1 * F</var>
<var id="C2">C1 * F</var>
<var id="EQ1">expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var>
<var id="EQ2">expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var>
</div>
<div class="solution">Equivalent lines</div>
<div class="hints" data-apply="appendContents">
<p>The above equations turn into the same equation, so they represent equivalent lines.</p>
</div>
</div>
<div id="parallel" data-type="compare-lines">
<div class="vars" data-ensure="C1 * F !== C2 && C1 * B2 !== C2 * B1">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
<var id="C1">randRangeNonZero( -5, 5 )</var>
<var id="F">randRangeNonZero( -5, 5 )</var>
<var id="A2">A1 * F</var>
<var id="B2">B1 * F</var>
<var id="C2">randRange( -5, 5 )</var>
<var id="EQ1">expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var>
<var id="EQ2">expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var>
</div>
<div class="solution">Parallel lines</div>
<div class="hints" data-apply="appendContents">
<p>The slopes are equal, and the y-intercepts are different, so the lines are parallel.</p>
</div>
</div>
<div id="perpendicular" data-type="compare-lines">
<div class="vars">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
<var id="C1">randRangeNonZero( -5, 5 )</var>
<var id="F">randRange( 1, 5 )</var>
<var id="A2"> -1 * B1 * F</var>
<var id="B2">A1 * F</var>
<var id="C2">randRangeNonZero( -5, 5 )</var>
<var id="EQ1">expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1</var>
<var id="EQ2">expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2</var>
</div>
<div class="solution">Perpendicular lines</div>
<div class="hints" data-apply="appendContents">
<p>The slopes are negative inverses of each other, so the lines are perpendicular.</p>
</div>
</div>
</div>
</div>
</body>
</html>