WebGL Lesson 13: Vector exercises elementary Students can understandCopy the code

For a new knowledge, how to quickly grasp it, it is impossible, must continue to strengthen the memory. In this paper, through a few exercises, to strengthen everyone’s grasp of the vector. Why elementary school students can understand, because the only operation is addition, subtraction, multiplication and division.


Practice aVector subtraction

Xiao Ming has 5 candy and 6 cookies, Xiao Hong ate 3 candy and 2 cookies in one breath, xiao Ming still have a few candy, a few cookies?

  • Resolution:

Write the 5 candies and 6 cookies xiao Ming had at the beginning as A vector A:

And then write xiao Hong’s food in one sitting as a vector B:

Then subtract these two vectors and you get the final result:

If shown, Xiao Ming left 2 candy and 4 cookies. The meaning of vector subtraction is sometimes so plain and simple. Xiao Ming heart bitter!!!!!

Exercise 2Multiple vector addition

The next day, Xiao Hong felt that she had eaten too much. She was so sorry that she decided to return it and gave her an extra candy and a cookie. How many candies and cookies does Xiao Ming have now?

  • Resolution:

Xiao Hong returned it. I think she returned 3 candies and 2 cookies. And then they gave one more candy and one more cookie. So the overall algorithm is as follows:

The figure above shows the addition of the three vectors. Xiao Ming has six candies and seven cookies at last. Xiao Ming woke up from his dream laughing.

Practice threeThe vector number by

Xiao Ming dream smile wake up, so what did Xiao Ming dream? Originally, xiao Ming dreamed that he had a double machine, put things in, you can come out of double things. As a result, Xiao Ming put all his candies and cookies in it. How many candies and cookies can xiao Ming retrieve from the machine in his dream?

  • parsing

Again, it’s very simple, it’s going to be twice as big, and we just multiply it by the number of vectors, like this:

Exercise 4Linear combination of vectors

One day, Xiao Ming brought six candies and eight cookies to school. He met Xiao Hong. Xiao Hong said, “I brought three candies and six cookies.” At this time, found that xiaogang there is very distressed, asked to find that Xiaogang did not bring anything, very hungry. After xiao Ming and Xiao Hong a discussion, the decision is as follows: Xiao Ming took out his half of things to Xiao Gang Xiao Hong took out his one-third of things to Xiao Gang asked, finally Xiao Gang has a few candy and a few cookies?

We use the following linear combination to get xiaogang’s last candy and cookies:

Xiao Gang ended up with four candies and six cookies.

Summarize vector operations

Vector operations are not separated from elementary addition, subtraction, multiplication and division. The only thing to remember in elementary school is that addition, subtraction, multiplication and division are all for single numbers. And a vector is a bunch of numbers, so when you do this, you have to go through every number. Very simple, right.




At the end of the text, questions are answeredCopy the code
Can I say, I want to learn matrices.
  • A: I’ll meet you next time.