A scalar is a single number. For example, 1, -2, 1.2 are scalars. On the other hand, a vector is a list of numbers. The number of numbers in a vector is called the dimensionality of the vector. And when a vector is represented using a 1xn matrix that contains n components in a single row, we call the vector a row vector. And when a vector is represented using an nx1 matrix that contains n components in a single column, we call the vector a column vector.
For example, v1 is a 2-dimensional row vector and v2 is a 3-dimensional column vector.
Geometrically, we can think that a vector has both magnitude and direction. For example, we can think of the vector v = [1 2] as a line that originates from the origin and goes to the point x = 1, y = 2. The magnitude of the vector v is calculated as:
A unit vector is a vector that has the magnitude of 1. And we represent a unit vector in the following way:
So, if we divide the vector v with its magnitude, we will get the unit vector:
Please note that the unit vector will have the same direction as the vector u, only its magnitude becomes 1. And unit vectors are also called normalized vector.
Now, let’s look at an example.
So, the unit vector will be:






0 Comments