Return to Video

Introduction to matrices

  • 0:01 - 0:07
    Let's learn about matrices. So, what is a, well, what I do I mean when I say matrices?
  • 0:07 - 0:10
    Well, matrices is just the plural for matrix.
  • 0:10 - 0:16
    Which is probably a word you're familiar with more because of Hollywood than because of mathematics.
  • 0:16 - 0:21
    So, what is a matrix? Well, it's actually a pretty simple idea.
  • 0:21 - 0:24
    It's just a table of numbers. That's all a matrix is.
  • 0:24 - 0:28
    So, let me draw a matrix for you.
  • 0:28 - 0:30
    I don't like that toothpaste colored blue, so, let me use another color.
  • 0:30 - 0:38
    This is an example of a matrix. If I said, I don't know I'm going to pick some random numbers;
  • 0:38 - 0:46
    Five, one, two, three, zero, minus five. That is a matrix.
  • 0:46 - 0:52
    And all it is is a table of numbers and, oftentimes if you want to have a variable for a matrix, you
  • 0:52 - 0:55
    use a capital letter. So, you could use a capital 'A'.
  • 0:55 - 1:00
    Sometimes in some books they make it extra bold. So it could be a bold 'A', would be a matrix.
  • 1:00 - 1:04
    And, just a little bit of notation, So, they would call this matrix. Or, we would call
  • 1:04 - 1:10
    this matrix, just by convention, you would call this a two by three matrix.
  • 1:10 - 1:16
    And, sometimes they actually write it '2 by 3' below the bold letter they use to represent the matrix
  • 1:16 - 1:18
    What is two? And, what is three?
  • 1:18 - 1:23
    Well, two is the number of rows. We have one row, two row. This is a row, this is a row.
  • 1:23 - 1:26
    We have three columns; one, two , three.
  • 1:26 - 1:28
    So, that's why it's called a two by three matrix.
  • 1:28 - 1:34
    When you say, you know, if I said, if I said that B, I'll put it extra bold.
  • 1:34 - 1:43
    If B is a five by two matrix, that means that B would have, I can, let me do one
  • 1:43 - 1:47
    I'll just type in numbers; zero, minus five, ten.
  • 1:49 - 1:53
    So, it has five rows, it has two columns.
  • 1:53 - 1:56
    We'll have another column here. So, let's see; minus ten, three,
  • 1:56 - 2:04
    I'm justing putting in random numbers here. Seven, two, pi.
  • 2:04 - 2:07
    That is a five by two matrix.
  • 2:07 - 2:12
    So, I think you'd now have a kind of a convention that all a matrix is is a
  • 2:12 - 2:15
    table of numbers. You can represent it when you're doing it in variable form
  • 2:15 - 2:19
    you represent it as bold face capital letter. Sometimes you'd write two by three there.
  • 2:19 - 2:23
    And, you can actually reference the terms of the matrix.
  • 2:23 - 2:26
    In this example, the top example, where we have matrix A.
  • 2:26 - 2:33
    If someone wanted to reference, let's say, this, this element of the matrix.
  • 2:33 - 2:37
    So, what is that? That is in the second row. It's in row two.
  • 2:37 - 2:39
    And, it's in column two. Right?
  • 2:39 - 2:42
    This is column one, this is column two. Row one, row two.
  • 2:42 - 2:45
    So, it's in the second row, second column.
  • 2:45 - 2:52
    So, sometimes people will write that A, then they'll write, you know
  • 2:52 - 2:58
    two comma two is equal to zero.
  • 2:58 - 3:02
    Or, they might write, sometimes they'll write a lowercase a,
  • 3:02 - 3:07
    two comma two is equal to zero.
  • 3:07 - 3:12
    Well, what is A? These are just the same thing.
  • 3:12 - 3:14
    I'm just doing this to expose you to the notation, because
  • 3:14 - 3:16
    a lot of this really is just notation.
  • 3:16 - 3:22
    So, what is a, one comma three?
  • 3:22 - 3:25
    Well, that means we're in the first row and the third column.
  • 3:25 - 3:28
    First row; one, two, three. It's this value right here.
  • 3:28 - 3:29
    So, that equals two.
  • 3:29 - 3:32
    So, this is just all notation of what a matrix is;
  • 3:32 - 3:34
    it's a table of numbers, it can be represented this way.
  • 3:34 - 3:37
    We can represent its different elements that way.
  • 3:37 - 3:38
    So, you might be asking
  • 3:38 - 3:42
    "Sal, well, that's nice, a table of numbers with fancy
  • 3:42 - 3:44
    words and fancy notations. But, what is it good for?"
  • 3:44 - 3:46
    And that's the interesting point.
  • 3:46 - 3:52
    A matrix is just a data representation. It's just a way of writing down data.
  • 3:52 - 3:54
    That's all it is. It's a table of numbers.
  • 3:54 - 3:58
    But, it can be used to represent a whole set of phenomenon.
  • 3:58 - 4:02
    And if you're doing this in you Algebra 1 or your Algebra 2 class
  • 4:02 - 4:04
    you're probably using it to represent linear equations.
  • 4:04 - 4:08
    But, we will learn, later, that it, and I'll do a whole set of videos
  • 4:08 - 4:11
    on applying matrices to a whole bunch of different things.
  • 4:11 - 4:14
    But, it can represent, it's very powerful and if you're doing
  • 4:14 - 4:19
    computer graphics, that matrixes...The elements can represent pixels on your screen,
  • 4:19 - 4:21
    they can represent points in coordinate space,
  • 4:21 - 4:23
    they can represent...Who knows!
  • 4:23 - 4:25
    There's tonnes of things that they can represent.
  • 4:25 - 4:28
    But, the important thing to realize is that a matrix
  • 4:28 - 4:30
    isn't, it's not a natural phenomenon.
  • 4:30 - 4:35
    It's not like a lot of the mathematical concepts we've been looking at.
  • 4:35 - 4:38
    It's a way to represent a mathematical concept.
  • 4:38 - 4:40
    Or, a way of representing values. But you kinda have to
  • 4:40 - 4:43
    define what it's representing.
  • 4:43 - 4:45
    But, lets put that on the back burner a little bit
  • 4:45 - 4:48
    in terms of what it actually represents.
  • 4:48 - 4:52
    And the, oh, my wife is here. She's looking for our filing cabinet.
  • 4:52 - 4:54
    But anyway, back to what I was doing.
  • 4:54 - 4:57
    So, so, lets put on the back burner what a matrix is
  • 4:57 - 4:59
    actually representing. Let's learn the conventions.
  • 4:59 - 5:02
    Because, I think, uhm, at least initially, that tends to be
  • 5:02 - 5:04
    the hardest part, How do you add matrices?
  • 5:04 - 5:06
    How do you multiple matrices? How do you invert a matrices?
  • 5:06 - 5:09
    How do you find the determinant of a matrix?
  • 5:09 - 5:11
    I know all of those words might sound unfamiliar. Unless,
  • 5:11 - 5:14
    you've already been confused by then in your algebra class.
  • 5:14 - 5:16
    So. I'm gonna teach you all of those things first.
  • 5:16 - 5:18
    Which are all really human-defined conventions.
  • 5:18 - 5:23
    And then, later on, I'll make a whole bunch of videos on the intuition behind them,
  • 5:23 - 5:27
    and what they actually represent. So, let's get started.
  • 5:27 - 5:30
    So, lets say I wanted to add these two matrices.
  • 5:30 - 5:34
    Let's say, the first one, let me switch colors. Let's say,
  • 5:34 - 5:38
    I'll do relatively small ones, just, not to waste space.
  • 5:38 - 5:42
    So, you have the matrix; three, negative one, I don't know,
  • 5:42 - 5:49
    two, zero. I don't know, let's call that A, capital A.
  • 5:49 - 5:54
    And let's say matrix B, and I'm just making up numbers.
  • 5:54 - 6:06
    Matrix B is equal to; minus seven, two, three, five.
  • 6:06 - 6:14
    So, my question to you is: What is A,
  • 6:14 - 6:16
    so I'm doing it bold like they do in the text books, plus
  • 6:16 - 6:22
    matrix B? So, I'm adding two matrices. And, once again
  • 6:22 - 6:26
    this is just human convention. Someone defined how matrices add.
  • 6:26 - 6:28
    They could've defined it some other way. But, they said;
  • 6:28 - 6:30
    we're gonna make matrices add the way I'm
  • 6:30 - 6:32
    about to show you because it's useful for a whole set of phenomenon.
  • 6:32 - 6:35
    So, when you add two matrices you essentially just add
  • 6:35 - 6:40
    the corresponding elements. So, how does that work?
  • 6:40 - 6:43
    Well, you add the element that's in row one column one with
  • 6:43 - 6:46
    the element that's in row one column one. Alright, so, it's
  • 6:46 - 6:50
    three plus minus seven. So, three plus minus seven.
  • 6:50 - 6:55
    That'll be the one-one element. Then, the row one column two element
  • 6:55 - 6:59
    will be minus one plus two.
  • 6:59 - 7:02
    Put parenthesis around them so you know that these are
  • 7:02 - 7:05
    separate elements. And, you could guess how this keeps going.
  • 7:05 - 7:21
    This element will be two plus three. This element, this last element will be zero plus five.
  • 7:21 - 7:27
    So, that equals what? Three plus minus seven, that is minus four.
  • 7:27 - 7:32
    Minus one plus two, that's one. Two plus three is five. And,
  • 7:32 - 7:40
    zero plus five is five. So, there we have it, that is how we humans have defined the addition of two matrices.
  • 7:40 - 7:43
    And, by this definition, you can imagine that this is going to be the same thing
  • 7:43 - 7:49
    as B plus A. Right? And remember, this is something we have to think about
  • 7:49 - 7:53
    because we're not adding numbers anymore. You know one plus two is the same as
  • 7:53 - 7:57
    two plus one. Or, any two normal numbers, it doesn't matter what order you
  • 7:57 - 8:00
    add them in. But matrices it's not completely obvious. But, when you define it in this way
  • 8:00 - 8:04
    it doesn't matter if we do A plus B or B plus A. Right?
  • 8:04 - 8:07
    If we did B plus A, this would just say negative seven plus three.
  • 8:07 - 8:10
    This would just say two plus negative one. But, it would come out to the same values.
  • 8:10 - 8:12
    That is matrix addition.
  • 8:12 - 8:15
    And, you can imagine, matrix subtraction, it's essentially the same thing.
  • 8:15 - 8:22
    We would...Well, actually let me show you. What would be A minus B?
  • 8:27 - 8:32
    Well, you can also view that, this is capital B, it's a matrix
  • 8:32 - 8:35
    that's why I'm making it extra bold. But, that's the same thing as;
  • 8:35 - 8:43
    A plus minus one, times B. What's B? Well, B is;
  • 8:43 - 8:48
    minus seven, two, three, five. And, when you multiply
  • 8:48 - 8:50
    a scalar, when you just multiply a number times the matrix,
  • 8:50 - 8:53
    you just multiply that number times every one of its elements.
  • 8:53 - 8:58
    So, that equals A, matrix A, plus the matrix, we just multiply
  • 8:58 - 9:02
    the negative one times every element in here. So, seven,
  • 9:02 - 9:08
    minus two, minus three, five. And then we can do
  • 9:08 - 9:12
    what we just did up there. We know what A is. So,
  • 9:12 - 9:16
    this would equal, let's see, A is up here. So, three plus
  • 9:16 - 9:21
    seven is ten, negative one, plus negative two is minus three,
  • 9:21 - 9:29
    two plus minus three is minus one and zero plus five is five.
  • 9:29 - 9:32
    And, you didn't have to go through this exercise right here.
  • 9:32 - 9:34
    You could have, literally, just subtracted these elements from these elements
  • 9:34 - 9:35
    and you would have gotten the same value.
  • 9:35 - 9:38
    I did this because I wanted to show you also that multiplying
  • 9:38 - 9:41
    a scalar times, or just a value or a number, times a matrix
  • 9:41 - 9:47
    is just multiplying that number times all of the elements of that matrix.
  • 9:47 - 9:51
    And, so what...By this definition of matrix addition what do we know?
  • 9:51 - 9:54
    Well, we know that both matrices have to be the same size,
  • 9:54 - 9:59
    by this definition of the way we're adding. So, for example
  • 9:59 - 10:01
    you could add these two matrices, You could add, I don't know,
  • 10:01 - 10:08
    one, two, three, four, five, six, seven, eight, nine to this matrix;
  • 10:08 - 10:14
    to, I don't know, minus ten, minus one hundred, minus one thousand.
  • 10:14 - 10:20
    I'm making up numbers. One, zero, zero, one ,zero, one.
  • 10:20 - 10:22
    You can add these two matrices. Right?
  • 10:22 - 10:25
    Because they have the same number of rows and the same number of columns.
  • 10:25 - 10:30
    So, for example, if you were to add them. The first term up here would be one plus minus ten,
  • 10:30 - 10:34
    so, it would be minus nine. Two plus minus one hundred, minus ninety-eight.
  • 10:34 - 10:40
    I think you get the point. You'd have exactly nine elements and you'd have three rows of three columns.
  • 10:40 - 10:45
    But, you could not add these two matrices. You could not add...
  • 10:45 - 10:49
    Let me do it in a different color, just to show it is different,
  • 10:49 - 10:52
    You could not add, this blue, you could not add this matrix;
  • 10:52 - 11:03
    minus three, two to the matrix; I don't know, nine, seven.
  • 11:03 - 11:05
    And why can you not add them?
  • 11:05 - 11:08
    Well, they don't have corresponding elements to add up.
  • 11:08 - 11:12
    This is a one row by two column, this is one by two
  • 11:12 - 11:16
    and this is two by one. So, they don't have the same dimensions
  • 11:16 - 11:19
    so we can't add or subtract these matrices.
  • 11:19 - 11:22
    And, just as a side note, when a matrix has...when one of its
  • 11:22 - 11:27
    dimensions is one. So, for example, here you have one row
  • 11:27 - 11:30
    and multiple columns. This is actually called a row vector.
  • 11:30 - 11:32
    A vector is essentially a one dimensional matrix, where one
  • 11:32 - 11:36
    of the dimensions is one. So, this is a row vector and similarly,
  • 11:36 - 11:39
    this is a column vector. That's just a little extra terminology
  • 11:39 - 11:41
    that you should know. Uhm, if you take linear algebra and calculus
  • 11:41 - 11:44
    your professor might use those terms and it's good to be
  • 11:44 - 11:49
    familiar with it. Anyway, I'm pushing eleven minutes, so I will continue this in the next video. See you soon.
Title:
Introduction to matrices
Description:

What a matrix is. How to add and subtract them.

more » « less
Video Language:
English
Duration:
11:51

English subtitles

Revisions