If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:14:19

Video transcript

in the last video we saw a little bit more formally than you might have been exposed to in the past that a function is just a mapping of the members of one set to another set so if this is my first set X we call that the domain and the set that we're mapping to Y in this case that's called the codomain and the function just Maps each of the specific entries of X to an entry in Y when I say map it really just creates an association you could if we think of these in very maybe maybe even less abstract terms within some of those is more abstract you could view X as a basket of bananas and Y is a basket of apples and for every banana you're associating it with one of the apples though that would be a definition the mapping of going from each of those bananas to each of those apples would be a function I don't know if that helps you or not but I just want to kind of broaden your your already your kind of preconceived notion of what a function is I mean everything that you've probably seen before probably took something took a form that looks something like that we said Oh a function is use give me some number and I'll give you another number or I'll do something to that number while it can be much more general that it's association between any member of one set and some other members of another set now we know that vectors are members of sets right vectors in particular if we say that some vector if we say that some vector X is a member of some set let me just say it's a member of RN because that's what we deal with all that means is that this is just a particular representation of an n-tuple remember what RN was let me RN we defined way back I think maybe I don't know at the beginning of the linear algebra playlist we defined it as the set of all n-tuples n tuples you know x1 x2 xn where your x1 x2 s all the way to xn s are a member of the real numbers so your RN is most definitely a set this could be RN and obviously the use of the letter n is arbitrary it could be RM it could be RS and is just kind of a placeholder for how many tuples we have this could be r5 it could be five tuples and when we say that a vector X is a member of RN we're just saying that it's it's another way of writing one of these n tuples and all of our vectors so far or our column vectors that's the only type that we've defined so far and we say it's this ordered list where each of the members are member of our it's an ordered list of n it's an ordered list of n components x1 x2 all the way to xn where each of those guys or each of those X ones X 2's all the way to X ends are a member of the real numbers that's by definition what we mean when we say that X is a member of RN so if X is a member of RN so let me let me draw two sets right here let's say that this set right here is our n and then let me just change just to be general let me create another set right there and call that call that set right there are M just a different number it could be the same as n it could be different this is M tuples that's n tuples we could the vectors we've defined that vectors can be members of RN so you could have some vector here you could have some vector here and then if you associate with that vector in RM if you associate it with some vector in RM if you associate it with and let's call that vector let's call that vector y if you make this association that two is a function and that might have already been obvious to you and you know this would be a function that's mapping from RN to R M and actually I just want to make one little special note here when I just drew the arrow like this I'm this shows that I'm mapping between two sets I'm taking elements of this set and I'm associating with them elements of that set now in the last video you probably saw this I want to do the side note because I thought I realized it might have been confusing I introduced you to another way of writing a function like this where I said F could be defined as a mapping for any given X 2x squared and I just want to make a note on the notation when I just have a regular arrow I'm going between sets what I have when I have this little vertical line at the at the base of the arrow that's kind of the function definition it tells me for any X you give me in the first set in the second set I'm going to associate this X with in this case x squared anywhere I just wanted to make that side note but the whole I guess direction I was going in is that vectors are valid L elements of sets functions are just mappings between elements of sets so you could have functions of vectors and I even touched on that in a little bit in the last video when I talked about vector valued functions if your codomain if your co-domain is a subset of if your codomain is a subset of our m where m is greater than 1 then we say your function is vector valued it's going to it's not just mapping into the real numbers its mapping into some set of real well let me say some nm a tuple of real numbers so if you mapped you know to two-dimensional space you're dealing with a vector valued function now I've been all abstract and whatnot so let me actually deal with some vectors and it might make everything a little bit more concrete so let's say I define the function f I define the function f as f of x1 x2 and x3 is equal to is equal to let's say it's equal to x1 + 2 x2 and the second coordinate is just 3x3 and actually haven't formally defined coordinates for you yet but I think you understand that just from your basic algebra training so let's say that that's my function definition based on the notation that we've been introduced to we could say that F is a mapping from it's a mapping it's domain is r3 and it maps from r3 or it associates all values in r3 with some value in R 2 and R - right this is a 2-tuple this is a 2-tuple right so this is in our - this is a three tuple 3 tuple right or another way we could do this if we just wanted to write it in vector notation I could write I could write that F if you pass F to F some vector x1 x2 x3 I could say this will be equal to the vector and now it's going to have a two component vector it's going to be a vector in r2 where the first term is x 1 + 2 x2 and the second term is 3x 3 so let's play around with this a little bit see what it what it does force what it does to the vectors so what is what is f of let me do a simple one of the vector 1 1 1 well I get let's see 1 plus 2 times 1 plus 2 times 1 is I get the vector 3 and then my second term is just three times this one so I get the vector 3 3 fair enough let me do another one just just just to really experiment with this with this mapping if I get if I take the F of the vector in r3 2 4 1 what do I get that equals C 2 plus 2 times 4 that goes to the vector 10 right 2 plus 2 times 4 and then 3 times the set the third term right there so the vector 10 3 so how can we visualize this how can we visualize this well 3 dimensional vectors or vectors in r3 are not always the easiest to visualize but I think we can attempt to visualize these two guys let's see so the first the first let me do it a little bit better than that so let's say that this is the let's say this is the X 1 axis that's the X 2 axis that's the X 3 axis so this first vector right here this yellow one 1 1 1 and look like this 1 1 1 and so if I were to go out here then go out here and then go up 1 the point would be right there and if I were to draw it in standard position I'd start at the origin and the vector looks something like that and then the second guy 2 4 1 it would look like this it would be we'd go to out here we'd go for in this direction 1 2 3 4 and then we go one up so it looks something like this 2 for 1 I think you get the idea you get the idea so that I've drawn these two vectors these two vectors that are essentially in my domain our domain is r3 all right this is our 3 right here and let's see what our function maps these vectors to so the it Maps what's our codomain our codomain is r2 so this is much easier to visualize for us so we just have to draw two axes you just have to draw two axes like this let's call this x1 and let's call this X 2 and so what does F of 1 1 1 of this yellow vector it becomes 3 3 so if I do it in yellow 1 2 3 1 2 3 so it gets me this one if I draw in standard position the vector looks like this so we literally our function went from maps from this vector in r3 to this vector in r2 that was what our function did likewise if we take the other vector we went from this 2 for 1 vector to this vector 10 3 so 1 2 3 4 5 6 7 8 9 10 so it's going to look something like this that's going to be 3 up so it's going to look something like this so this vector right here by our function f got mapped let me do a different color got mapped to this vector this vector right here in our 3 got mapped to this vector in r2 by our function now this is just a kind of a switch of terminology when we talk about functions of vectors term that we tend to use is the word transformation transformation transform ation but it really is the exact same thing as a function I don't want to confuse you because if you've watched the differential equations playlist you saw the idea of a Laplace transformation which is really an operation that takes a function as an argument but in this case and when we're dealing in the linear algebra word transformation is really just a function operating on vectors or the way we're going to use it it's just a function operating on vectors function operating on vectors and so the general notation instead of writing a lowercase F like that we instead of work for function people use an uppercase T to say it's a transformational it doesn't have to be an uppercase T but that's the one that people use the most just like this could be a G or an H but people always use the lowercase F so the same way we could have written this we could have called this we could have called this a transformation and I you know my sense of why in the linear algebra world they use this is because you kind of imagine that this vector is being changed into that vector or that this vector is being transformed into that vector I think that's why they call it a transformation as opposed to a function actually makes a lot more sense when you start going into things like you know video game programming and a lot of what we're embarking on with our transformations is key to linear to video game programming but you're kind of transforming one image into another image if you're viewing at it from a different angle or or whatever else you might want to do we'll talk a lot more about that in the future but I just want to introduce you this notation so these these statements could have I could have just as easily written my I could have replaced all my FS with T's and I could have defined some transformation and I just want to make you comfortable with the notation I could have defined that similarly the transformation from R 3 to R 2 R 3 to R 2 and I could have said that T of X 1 X 2 X 3 is equal to the two tuple X 1 plus 2 X 1 comma 3 X 3 and I could have just assembly I could have put a tee up here because I've defined it the same way I could have said T of my vector 1 1 1 is equal to 3 3 now you might say hey Sal why are you going through all this trouble of you know replacing the T's with us I'm just doing this so you don't get confused so that when you see when in you know and in your linear algebra book when you see linear algebra problems so you see this big capital T and like well I've never seen that before and they're using this fancy word called a transformation this is completely identical to your notion of a function it is a function in the next video I'm going to talk about linear transformations that's really just linear functions and I'll define that a little bit more precisely in the next video but hopefully by you know by watching this video you at least have a sense that you can apply functions to vectors and in the linear algebra world we tend to call those transformations and hopefully this example right here gives you at least a visual representation of why it's called a transformation we're transforming from one vector to another