How the matrix transforms the vector

Source: Internet
Author: User

In general, a square can describe arbitrary linear transformations. Linear transformations retain lines and parallel lines, but the origin does not move. While linear transformations retain lines, other geometric properties such as length, angle, area, and volume may be transformed. In a non-technical sense, a linear transformation may "stretch" the coordinate system, but not "bend" or "curl" the coordinate system.

How the matrix transforms the vector

Vectors can be geometrically interpreted as a series of displacements parallel to the axes, in general, any vector v can be written as an "extended" form:

Another slightly different form is:

Note that the unit vector on the right is the x, Y, Z axis, where the concept is mathematically only, and each coordinate of the vector indicates a directional displacement parallel to the corresponding axis.

Let's take the above vector and rewrite it again, this time by defining p,Q,R as the unit vector pointing to the +x,+y and +z directions, as shown below:

v = xp + yq + zr

Now, Vector v is represented as vector p,Q,R 's linear transformation, vector p,Q,R called the base vector. Here the base vector is a Cartesian axis, but in fact a coordinate system can be defined with any 3 base vectors, of course the three base vectors are linearly independent (i.e. not on the same plane). Constructing a 3 x 3 matrix M with p,Q,R as a line, the following matrices can be obtained:

Multiply the matrix with a vector to get:

If the line of the matrix is interpreted as the base vector of the coordinate system, then multiplying the matrix is equivalent to performing a one-time coordinate transformation, if AM=B, we can say thatM converts a to b.

From this point of view, the term "conversion" and "multiplication" are equivalent.

Frankly, the matrix is not mysterious, it is just a compact way to express the mathematical operations required for coordinate transformation. Further, the linear algebra operation Matrix is a simple method to convert or derive more complex transformations.

form of a matrix:

Base vector [1, 0, 0], [0, 1, 0], [0, 0, 1] multiplied by any matrix M:

When multiplied by m with the base vector [1, 0, 0], the result is the 1th line of m . The other two rows also have the same result, which is a key finding: each line of the matrix can be interpreted as the converted base vector.

This powerful concept has two important properties:

1, there is a simple way to visualize the transformation represented by the interpretation matrix.

2, with the inverse of the establishment of the matrix may----give a desired transformation (such as rotation, scaling, etc.), can construct a matrix to represent this transformation. All we have to do is calculate the transformation of the base vector, and then fill in the matrix with the transformed base vectors.

First take a look at the 2D example, a 2 x 2 matrix:

What is the transformation represented by this matrix? First, extract the base vectors p and Qfrom the matrix:

p = [2 1]

Q = [-1 2]

Figure 7.1 shows these vectors in the Cartesian plane as a reference to the "original" base vector (x-axis, y-axis).

As shown in 7.1, the X-base vector is transformed to the p -vector above, and the Y-base vector is transformed to the Q vector. So the idea of a matrix in 2D is to imagine an "L" shape consisting of a row vector. In this example, it is clear to see that the partial transformation ofM represents a counterclockwise rotation of 26 degrees.

Of course, all vectors are affected by linear transformations, not just the base vectors, from the "L" shape can be transformed the most intuitive impression, the base vector composition of the entire 2D parallelogram painting complete to help further see the effect of the transformation on other vectors, 7.2:

Parallelogram is called a "deflection box", drawing an object in the box helps to understand, as shown in 7.3:

Obviously, Matrix M not only rotates the coordinate system, it also stretches it.

This technique can also be applied to 3D conversions. There are two base vectors in the 2D, which form the "L" type; there are three base vectors in 3D, which form a "tripod". First, let's show a pre-conversion item. Figure 7.4 shows a teapot, a cube. The base vector is at the "unit" vector.

(For the sake of not confusing the graph, the z-axis base vector is not marked [0, 0, 1], which is blocked by the teapot and the cube. )

Now consider the following 3D transformation matrix:

Extracting the base vector from the line of the matrix, you can imagine the transformation represented by the matrix. The transformed base vector, cube, teapot 7.5 shows:

This transformation contains a z-axis clockwise rotation of 45 degrees and irregular scaling, making the teapot "higher" than before. Note that the transformation does not affect the z-axis, because the third line of the matrix is [0, 0, 1].

How the matrix transforms the vector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.