1 00:00:00,000 --> 00:00:00,460 2 00:00:00,460 --> 00:00:03,040 Let's think about what functions really do, and then 3 00:00:03,040 --> 00:00:06,589 we'll think about the idea of an inverse of a function. 4 00:00:06,589 --> 00:00:08,449 So let's start with a pretty straightforward function. 5 00:00:08,449 --> 00:00:13,509 Let's say f of x is equal to 2x plus 4. 6 00:00:13,509 --> 00:00:20,339 And so if I take f of 2, f of 2 is going to be equal to 2 times 7 00:00:20,339 --> 00:00:24,559 2 plus 4, which is 4 plus 4, which is 8. 8 00:00:24,559 --> 00:00:32,469 I could take f of 3, which is 2 times 3 plus 4, 9 00:00:32,469 --> 00:00:35,920 which is equal to 10. 10 00:00:35,920 --> 00:00:36,960 6 plus 4. 11 00:00:36,960 --> 00:00:38,280 So let's think about it in a little bit more 12 00:00:38,280 --> 00:00:39,800 of an abstract sense. 13 00:00:39,799 --> 00:00:42,989 So there's a set of things that I can input into this function. 14 00:00:42,990 --> 00:00:44,700 You might already be familiar with that notion. 15 00:00:44,700 --> 00:00:46,050 It's the domain. 16 00:00:46,049 --> 00:00:48,759 The set of all of the things that I can input into that 17 00:00:48,759 --> 00:00:52,759 function, that is the domain. 18 00:00:52,759 --> 00:00:57,289 And in that domain, 2 is sitting there, you have 3 over 19 00:00:57,289 --> 00:00:59,700 there, pretty much you could input any real number 20 00:00:59,700 --> 00:01:00,850 into this function. 21 00:01:00,850 --> 00:01:02,810 So this is going to be all real, but we're making it a 22 00:01:02,810 --> 00:01:05,150 nice contained set here just to help you visualize it. 23 00:01:05,150 --> 00:01:07,830 Now, when you apply the function, let's think about 24 00:01:07,829 --> 00:01:10,000 it means to take f of 2. 25 00:01:10,000 --> 00:01:13,900 We're inputting a number, 2, and then the function is 26 00:01:13,900 --> 00:01:15,790 outputting the number 8. 27 00:01:15,790 --> 00:01:19,270 It is mapping us from 2 to 8. 28 00:01:19,269 --> 00:01:22,489 So let's make another set here of all of the possible values 29 00:01:22,489 --> 00:01:23,929 that my function can take on. 30 00:01:23,930 --> 00:01:27,780 31 00:01:27,780 --> 00:01:30,299 And we can call that the range. 32 00:01:30,299 --> 00:01:33,319 There are more formal ways to talk about this, and there's a 33 00:01:33,319 --> 00:01:36,639 much more rigorous discussion of this later on, especially in 34 00:01:36,640 --> 00:01:39,060 the linear algebra playlist, but this is all the different 35 00:01:39,060 --> 00:01:40,200 values I can take on. 36 00:01:40,200 --> 00:01:44,549 So if I take the number 2 from our domain, I input it into the 37 00:01:44,549 --> 00:01:48,269 function, we're getting mapped to the number 8. 38 00:01:48,269 --> 00:01:50,259 So let's let me draw that out. 39 00:01:50,260 --> 00:01:56,210 So we're going from 2 to the number 8 right there. 40 00:01:56,209 --> 00:01:59,059 And it's being done by the function. 41 00:01:59,060 --> 00:02:01,210 The function is doing that mapping. 42 00:02:01,209 --> 00:02:05,189 That function is mapping us from 2 to 8. 43 00:02:05,189 --> 00:02:09,180 This right here, that is equal to f of 2. 44 00:02:09,180 --> 00:02:10,080 Same idea. 45 00:02:10,080 --> 00:02:18,810 You start with 3, 3 is being mapped by the function to 10. 46 00:02:18,810 --> 00:02:20,479 It's creating an association. 47 00:02:20,479 --> 00:02:25,319 The function is mapping us from 3 to 10. 48 00:02:25,319 --> 00:02:28,400 Now, this raises an interesting question. 49 00:02:28,400 --> 00:02:32,840 Is there a way to get back from 8 to the 2, or is there a 50 00:02:32,840 --> 00:02:35,219 way to go back from the 10 to the 3? 51 00:02:35,219 --> 00:02:37,340 Or is there some other function? 52 00:02:37,340 --> 00:02:39,870 Is there some other function, we can call that the inverse 53 00:02:39,870 --> 00:02:41,659 of f, that'll take us back? 54 00:02:41,659 --> 00:02:44,259 Is there some other function that'll take 55 00:02:44,259 --> 00:02:46,199 us from 10 back to 3? 56 00:02:46,199 --> 00:02:48,969 We'll call that the inverse of f, and we'll use that as 57 00:02:48,969 --> 00:02:52,789 notation, and it'll take us back from 10 to 3. 58 00:02:52,789 --> 00:02:54,359 Is there a way to do that? 59 00:02:54,360 --> 00:02:58,070 Will that same inverse of f, will it take us back from-- 60 00:02:58,069 --> 00:03:02,289 if we apply 8 to it-- will that take us back to 2? 61 00:03:02,289 --> 00:03:07,229 62 00:03:07,229 --> 00:03:10,759 Now, all this seems very abstract and difficult. 63 00:03:10,759 --> 00:03:13,989 What you'll find is it's actually very easy to solve for 64 00:03:13,990 --> 00:03:17,030 this inverse of f, and I think once we solve for it, it'll 65 00:03:17,030 --> 00:03:18,539 make it clear what I'm talking about. 66 00:03:18,539 --> 00:03:20,819 That the function takes you from 2 to 8, the inverse will 67 00:03:20,819 --> 00:03:23,359 take us back from 8 to 2. 68 00:03:23,360 --> 00:03:25,470 So to think about that, let's just define-- let's just 69 00:03:25,469 --> 00:03:27,789 say y is equal to f of x. 70 00:03:27,789 --> 00:03:30,620 71 00:03:30,620 --> 00:03:33,509 So y is equal to f of x, is equal to 2x plus 4. 72 00:03:33,509 --> 00:03:39,109 So I can write just y is equal to 2x plus 4, and this once 73 00:03:39,110 --> 00:03:40,420 again, this is our function. 74 00:03:40,419 --> 00:03:42,469 You give me an x, it'll give me a y. 75 00:03:42,469 --> 00:03:43,990 But we want to go the other way around. 76 00:03:43,990 --> 00:03:46,760 We want to give you a y and get an x. 77 00:03:46,759 --> 00:03:50,489 So all we have to do is solve for x in terms of y. 78 00:03:50,490 --> 00:03:51,159 So let's do that. 79 00:03:51,159 --> 00:03:54,460 If we subtract 4 from both sides of this equation-- let me 80 00:03:54,460 --> 00:03:57,349 switch colors-- if we subtract 4 from both sides of this 81 00:03:57,349 --> 00:04:02,310 equation, we get y minus 4 is equal to 2x, and then if we 82 00:04:02,310 --> 00:04:08,270 divide both sides of this equation by 2, we get y over 2 83 00:04:08,270 --> 00:04:12,750 minus 2-- 4 divided by 2 is 2-- is equal to x. 84 00:04:12,750 --> 00:04:15,159 Or if we just want to write it that way, we can just swap the 85 00:04:15,159 --> 00:04:20,100 sides, we get x is equal to 1/2y-- same thing as 86 00:04:20,100 --> 00:04:23,189 y over 2-- minus 2. 87 00:04:23,189 --> 00:04:26,269 So what we have here is a function of y that 88 00:04:26,269 --> 00:04:28,750 gives us an x, which is exactly what we wanted. 89 00:04:28,750 --> 00:04:33,509 We want a function of these values that map back to an x. 90 00:04:33,509 --> 00:04:38,099 So we can call this-- we could say that this is equal to-- 91 00:04:38,100 --> 00:04:41,840 I'll do it in the same color-- this is equal to f inverse 92 00:04:41,839 --> 00:04:43,569 as a function of y. 93 00:04:43,569 --> 00:04:45,079 Or let me just write it a little bit cleaner. 94 00:04:45,079 --> 00:04:49,050 We could say f inverse as a function of y-- so we can have 95 00:04:49,050 --> 00:04:52,650 10 or 8-- so now the range is now the domain for f inverse. 96 00:04:52,649 --> 00:04:58,120 f inverse as a function of y is equal to 1/2y minus 2. 97 00:04:58,120 --> 00:05:00,569 So all we did is we started with our original function, y 98 00:05:00,569 --> 00:05:05,300 is equal to 2x plus 4, we solved for-- over here, we've 99 00:05:05,300 --> 00:05:07,870 solved for y in terms of x-- then we just do a little bit of 100 00:05:07,870 --> 00:05:12,250 algebra, solve for x in terms of y, and we say that that is 101 00:05:12,250 --> 00:05:15,579 our inverse as a function of y. 102 00:05:15,579 --> 00:05:17,370 Which is right over here. 103 00:05:17,370 --> 00:05:19,569 And then, if we, you know, you can say this is-- you could 104 00:05:19,569 --> 00:05:22,639 replace the y with an a, a b, an x, whatever you want to do, 105 00:05:22,639 --> 00:05:26,240 so then we can just rename the y as x. 106 00:05:26,240 --> 00:05:29,000 So if you put an x into this function, you would get f 107 00:05:29,000 --> 00:05:34,660 inverse of x is equal to 1/2x minus 2. 108 00:05:34,660 --> 00:05:38,340 So all you do, you solve for x, and then you swap the y and the 109 00:05:38,339 --> 00:05:39,719 x, if you want to do it that way. 110 00:05:39,720 --> 00:05:41,240 That's the easiest way to think about it. 111 00:05:41,240 --> 00:05:44,110 And one thing I want to point out is what happens when you 112 00:05:44,110 --> 00:05:46,254 graph the function and the inverse. 113 00:05:46,254 --> 00:05:48,420 So let me just do a little quick and dirty 114 00:05:48,420 --> 00:05:50,160 graph right here. 115 00:05:50,160 --> 00:05:52,189 And then I'll do a bunch of examples of actually solving 116 00:05:52,189 --> 00:05:53,579 for inverses, but I really just wanted to give 117 00:05:53,579 --> 00:05:55,029 you the general idea. 118 00:05:55,029 --> 00:05:57,009 Function takes you from the domain to the range, the 119 00:05:57,009 --> 00:05:59,569 inverse will take you from that point back to the original 120 00:05:59,569 --> 00:06:01,810 value, if it exists. 121 00:06:01,810 --> 00:06:04,500 So if I were to graph these-- just let me draw a little 122 00:06:04,500 --> 00:06:08,790 coordinate axis right here, draw a little bit of a 123 00:06:08,790 --> 00:06:12,040 coordinate axis right there. 124 00:06:12,040 --> 00:06:16,629 This first function, 2x plus 4, its y intercept is going to be 125 00:06:16,629 --> 00:06:24,519 1, 2, 3, 4, just like that, and then its slope will 126 00:06:24,519 --> 00:06:25,609 look like this. 127 00:06:25,610 --> 00:06:31,470 It has a slope of 2, so it will look something like-- its graph 128 00:06:31,470 --> 00:06:33,870 will look-- let me make it a little bit neater than that-- 129 00:06:33,870 --> 00:06:36,399 it'll look something like that. 130 00:06:36,399 --> 00:06:38,449 That's what that function looks like. 131 00:06:38,449 --> 00:06:40,389 What does this function look like? 132 00:06:40,389 --> 00:06:43,680 What does the inverse function look like, as a function of x? 133 00:06:43,680 --> 00:06:46,980 Remember we solved for x, and then we swapped the x 134 00:06:46,980 --> 00:06:47,900 and the y, essentially. 135 00:06:47,899 --> 00:06:51,569 We could say now that y is equal to f inverse of x. 136 00:06:51,569 --> 00:06:56,399 So we have a y-intercept of negative 2, 1, 2, and 137 00:06:56,399 --> 00:07:00,149 now the slope is 1/2. 138 00:07:00,149 --> 00:07:02,229 The slope looks like this. 139 00:07:02,230 --> 00:07:04,120 Let me see if I can draw it. 140 00:07:04,120 --> 00:07:08,509 The slope looks-- or the line looks something like that. 141 00:07:08,509 --> 00:07:10,170 And what's the relationship here? 142 00:07:10,170 --> 00:07:12,060 I mean, you know, these look kind of related, it looks 143 00:07:12,060 --> 00:07:14,079 like they're reflected about something. 144 00:07:14,079 --> 00:07:15,990 It'll be a little bit more clear what they're reflected 145 00:07:15,990 --> 00:07:19,530 about if we draw the line y is equal to x. 146 00:07:19,529 --> 00:07:22,250 So the line y equals x looks like that. 147 00:07:22,250 --> 00:07:23,420 I'll do it as a dotted line. 148 00:07:23,420 --> 00:07:29,740 149 00:07:29,740 --> 00:07:32,620 And you could see, you have the function and its inverse, 150 00:07:32,620 --> 00:07:36,780 they're reflected about the line y is equal to x. 151 00:07:36,779 --> 00:07:39,099 And hopefully, that makes sense here. 152 00:07:39,100 --> 00:07:41,330 Because over here, on this line, let's take 153 00:07:41,329 --> 00:07:42,529 an easy example. 154 00:07:42,529 --> 00:07:49,609 Our function, when you take 0-- so f of 0 is equal to 4. 155 00:07:49,610 --> 00:07:54,129 Our function is mapping 0 to 4. 156 00:07:54,129 --> 00:08:00,050 The inverse function, if you take f inverse of 4, f 157 00:08:00,050 --> 00:08:02,920 inverse of 4 is equal to 0. 158 00:08:02,920 --> 00:08:08,120 Or the inverse function is mapping us from 4 to 0. 159 00:08:08,120 --> 00:08:10,209 Which is exactly what we expected. 160 00:08:10,209 --> 00:08:14,719 The function takes us from the x to the y world, and then we 161 00:08:14,720 --> 00:08:17,240 swap it, we were swapping the x and the y. 162 00:08:17,240 --> 00:08:18,060 We would take the inverse. 163 00:08:18,060 --> 00:08:21,055 And that's why it's reflected around y equals x. 164 00:08:21,055 --> 00:08:24,030 So this example that I just showed you right here, function 165 00:08:24,029 --> 00:08:30,069 takes you from 0 to 4-- maybe I should do that in the function 166 00:08:30,069 --> 00:08:35,809 color-- so the function takes you from 0 to 4, that's the 167 00:08:35,809 --> 00:08:39,679 function f of 0 is 4, you see that right there, so it goes 168 00:08:39,679 --> 00:08:42,549 from 0 to 4, and then the inverse takes us 169 00:08:42,549 --> 00:08:45,829 back from 4 to 0. 170 00:08:45,830 --> 00:08:49,379 So f inverse takes us back from 4 to 0. 171 00:08:49,379 --> 00:08:50,429 You saw that right there. 172 00:08:50,429 --> 00:08:55,750 When you evaluate 4 here, 1/2 times 4 minus 2 is 0. 173 00:08:55,750 --> 00:08:57,730 The next couple of videos we'll do a bunch of examples so you 174 00:08:57,730 --> 00:09:00,180 really understand how to solve these and are able to do 175 00:09:00,179 --> 00:09:05,009 the exercises on our application for this.