Contents:

Free Python Development Course ➞ Take a free Python course and create a Telegram bot, web parser, and website from scratch. The speaker is the head of the development department at Sber.
Learn moreIn this article, we will look at vectors in mathematics. You will learn what vectors are, their main types, and methods of working with them. To deepen our understanding of the material, we will use Python and run the code in the free Google Colab service. This will allow you to not only familiarize yourself with the theoretical aspects but also apply what you have learned in practice.
If you have never programmed before, simply copy the completed code examples into Google Colab and click the "Run" button. If you are interested in experimenting, try changing the numerical values in the code and analyze how this affects the vector displayed in the graph. This is a great way to get acquainted with the basics of programming and data visualization.
Content is an important element of any web page, allowing users to quickly navigate information. It should be clear and structured to facilitate navigation and improve the user experience. Properly formatted content not only helps users but also promotes better indexing of pages by search engines. Using keywords in headings and subheadings can increase the visibility of a page in search results. Optimal content includes relevant and informative data that matches the interests of your audience. Creating high-quality content with clear and logical content will help you attract more visitors and retain them on your site.
- What is a vector: definition and notation
- Main types of vectors
- Vector coordinates
- Addition and subtraction
What is a vector: definition and notation
A vector is a mathematical object with two main characteristics: length and direction. Visually, it can be depicted as an arrow or a line segment that has a starting and ending point. For example, a vector with coordinates (3, 4) indicates a displacement of 3 units to the right and 4 units up from the origin A. Vectors play an important role in various fields of mathematics and physics, allowing us to describe motion, forces, and other vector quantities.
Vectors play a key role in science and engineering, allowing us to describe physical quantities such as forces, velocities, accelerations, and displacements. The main difference between vectors and scalar quantities is that they take into account not only the numerical value but also the direction. For example, the speed "10 m/s" is a scalar quantity, whereas the statement "the wind is blowing north at 10 m/s" describes a vector that includes both magnitude and direction. This property of vectors makes them indispensable in such fields as physics, engineering, and computer science, where it is important to consider not only the size, but also the direction of the effect.

Before we continue, let's look at how to write vectors. Vectors are an important element in mathematics and physics, as well as in computer science and data processing. There are several methods for representing them, including coordinate notation, matrix representation, and using different coordinate systems. Understanding these methods will help you work more effectively with vectors in various applications, whether it's machine learning, graphics, or numerical methods.
- Letter with an arrow. The most common way is a lowercase Latin letter with a small arrow on top, for example: , , . The arrow shows that this is not just a number, but a quantity with a direction.
- Notation through start and end points. A vector is denoted by two letters: a start letter and an end letter. For example, a vector from point A to B.
- Bold letters. In printed texts and on some websites, vectors are written without arrows, using bold lowercase letters: a, b, v.
- The length (magnitude) of a vector is indicated by vertical lines. Here are variations of this notation: ||, ||, ||, || or |a|, |v|, |b|.
- Notation using coordinates. A vector can be specified by its components: in a two-dimensional coordinate system, this is = (vx, vy), and in a three-dimensional coordinate system, it is = (vx, vy, vz). Components indicate how much the vector is shifted along each axis.
Open Google Colab and paste the following code. After running the code, you will see a red arrow representing a vector that points from point A to point B. This visual representation will help you better understand the concept of vectors and their direction.

Submit the text that needs to be revised, and I will help you with its correction.
How to determine the length of a vector: three effective methods
Determining the length of a vector is an important problem in mathematics and physics. There are several ways to calculate the length of a vector, each of which can be useful in different contexts.
The first method is to use the vector length formula in Euclidean geometry. If a vector is given by coordinates (x, y) in two-dimensional space, the length can be calculated using the formula √(x² + y²). In three-dimensional space with coordinates (x, y, z), the vector length is defined as √(x² + y² + z²).
The second method involves using vector norms. The norm of a vector, also known as its length, is defined as the square root of the sum of the squares of its components. This is a universal method that is used in various fields of science and engineering.
The third method is to use graphical methods. The length of a vector can be visualized on a coordinate plane or in space, making it easy to determine its length using a ruler or other measuring tools.
Each of these methods is suitable for different problems and levels of complexity, so it is important to choose the one that suits your needs. Understanding and applying these methods correctly will help you work effectively with vectors in mathematics and physics.
Types of Vectors
Vectors can be classified by various parameters, including length, direction, and position in space. Let's look at the main types of vectors that play an important role in mathematics and physics.
A zero vector is a vector that has no length and direction. It can be compared to a person who is at rest, not moving in any direction. In a coordinate system, the zero vector is represented by a point at the origin and is denoted by zero with an arrow above it. It plays an important role in mathematics and physics, as it serves as a starting point for other vectors and is used in various calculations and transformations. Understanding the zero vector is essential for studying vector algebra and analyzing vector spaces.
Equal vectors are characterized by having the same length and direction, even if their origins are located at different points. For example, the vector connecting points A(1, 2) and B(4, 6) is equal to the vector connecting C(3, 1) and D(6, 5), since both represent the same displacement—(3, 4). This can be illustrated using two cyclists traveling at the same speed in the same direction but starting from different places along parallel routes. Understanding vector equality is important in mathematics and physics because it allows us to analyze and compare different directions and magnitudes, which is the basis for solving problems in these fields.
Opposite vectors have the same length but point in different directions. When added together, the result is a zero vector. This can be compared to two cyclists starting from the same point and traveling in different directions at the same speed. Such vectors are important in mathematics and physics because they demonstrate the principles of balance and reaction, which has applications in various fields of science and engineering.
Orthogonal vectors form an angle of 90°, making them important in geometry and physics. Their dot product is zero, indicating the absence of mutual influence. Consider the example of cyclists at an intersection: if one is traveling north and the other east, their trajectories form orthogonal vectors. This clearly illustrates the concept of vector orthogonality and its application in various fields, such as mechanics and analytic geometry. Understanding these properties helps in solving problems related to the direction and interaction of forces.
A free vector can be moved parallel to itself to any point in space without changing its length or direction. Vectors of this type are considered equal, even if they originate from different points. For example, consider a car: no matter what street it's traveling on, as long as its speed and direction remain constant, it's still the same vector, mathematically speaking. This property of free vectors makes them important in a variety of fields, including physics, engineering, and computer graphics, where accurately describing motion and direction is critical.
A position vector is a vector that connects the origin to a specific point in space, thereby defining its location. It's analogous to the route from your home to the store: each time, the path starts at zero and travels toward a specific destination. A vector specifies not only the direction but also the distance to a point, making it an important tool in mathematics and physics for describing spatial relationships.

Reworked text:
Also study:
Collinearity of vectors is an important concept in linear algebra that indicates whether two or more vectors on the same line. Vectors are said to be collinear if there is a scalar that can be multiplied by one vector to produce the other. This property of vectors has significant implications in various fields, including physics, engineering, and computer science.
There are several methods that can be used to determine whether vectors are collinear. One method is to calculate their cross product. If the cross product is zero, then the vectors are collinear. You can also use the coordinates of the vectors: if vectors \( \mathbf{a} = (x_1, y_1) \) and \( \mathbf{b} = (x_2, y_2) \) satisfy the condition \( \frac{y_1}{y_2} = \frac{x_1}{x_2} \), then they are collinear.
Collinearity of vectors plays a key role in analyzing systems and solving equations, making this concept indispensable for students and professionals working with vectors and their properties.
How to Determine Vector Coordinates
A vector can be described not only by its length and direction, but also using coordinates. These coordinates are numerical values that indicate how much the vector is shifted along each axis of the coordinate plane. If a vector starts at the origin A(0,0), its coordinates will coincide with the coordinates of its endpoint. For example, if the endpoint of a vector is located at point B(3,4), then the coordinates of the vector will be (3,4). Thus, understanding vectors through coordinates is a key aspect of vector algebra and is useful for a variety of applications, including physics and computer graphics.

In other cases, the difference between the coordinates of a vector's end and start points is used to calculate the coordinates. The formula for this is: = (x₂ − x₁, y₂ − y₁). Let's give two examples for a clearer understanding.
- a vector with start point A(1, 2) and end point B(5, 5);
- a vector with start point C(−5, −6) and end point D(−1, −3).
The vector with coordinates (5 − 1, 5 − 2) is equal to (4, 3), and the vector with coordinates (−1 − (−5), −3 − (−6)) is also equal to (4, 3). Both vectors have the same coordinates (4, 3), which confirms their equality: the length and direction of these vectors coincide, despite the fact that they start at different points. To clearly display vectors and their location on the coordinate plane, run the code that will help visualize their characteristics.

Read also:
Vector product of vectors: definition and calculation methods
The vector product, also known as the cross product of two vectors, is a mathematical operation that allows you to obtain a new vector perpendicular to the two original vectors. This product is widely used in physics and engineering, especially in problems related to mechanics and electromagnetism.
To calculate the vector product of two vectors, you need to know their coordinates. Let vectors A and B be defined in three-dimensional space as A = (A1, A2, A3) and B = (B1, B2, B3). The vector product A × B is calculated using the following formula:
A × B = (A2 * B3 - A3 * B2, A3 * B1 - A1 * B3, A1 * B2 - A2 * B1).
The result of the operation is a new vector that has a direction determined by the right-hand rule and a magnitude equal to the area of the parallelogram formed by the original vectors.
The vector product has many applications, including calculating the moment of force, determining the direction of a magnetic field, and solving problems in analytic geometry. Understanding the cross product and its properties is an important aspect in the study of vector algebra and physics.
Addition and Subtraction of Vectors
Addition and subtraction of vectors are fundamental operations that allow us to determine the resulting displacements, forces, and velocities in various fields of science and engineering. These operations play a key role in solving problems in physics, mathematics, and engineering that require considering multiple influences simultaneously. Understanding vector operations helps us accurately model and analyze various processes, making them indispensable in scientific research and practical applications.
To better understand vectors, imagine a situation where a person takes three steps east and then four steps north. His final displacement can be calculated as the sum of the two vectors. If we need to determine the speed at which one car approaches another, then the difference in the velocity vectors is used. This allows us to accurately determine the direction and magnitude of the objects' movement. Understanding these fundamentals of vector algebra is important for solving problems in physics and engineering, as well as in everyday life where we frequently encounter various vector quantities.
Addition and subtraction of vectors can be accomplished in several ways, but we will focus on a simple algebraic method. This method involves adding or subtracting the coordinates of vectors component by component. For example, if we have two vectors A = (ax, ay) and B = (bx, by), their sum will be represented by a vector C with coordinates C = (ax + bx, ay + by). This method allows us to quickly and easily perform operations with vectors, which is especially useful in various fields of mathematics and physics.
Consider the vectors (2, 1) and (1, 3). Their sum is calculated as follows: (2, 1) + (1, 3) = (2 + 1, 1 + 3) = (3, 4). On a graph, this is represented as a point with coordinates (3, 4). Vector addition is an important aspect of vector algebra that helps us understand how vectors interact with each other in space.

To plot a graph of vector addition, you can use the following code. It will allow you to visualize vectors and their sum, which will greatly simplify the understanding of this mathematical process. With this code, you can visually see how two or more vectors are added together to form a new vector. This is useful for both students learning vector algebra and professionals working in physics and engineering. The code can be adapted to various visualization libraries, such as Matplotlib in Python, making it a versatile tool for educational and practical purposes. Let's continue exploring vectors by taking the vectors (2, 1) and (1, 3). Now we will find their difference. The calculation is as follows: (2, 1) - (1, 3) = (2 - 1, 1 - 3) = (1, -2). To better understand this process, we will create a new graph that will demonstrate the result of this calculation.

Formatting code for Google Colab is an important step in working with this tool. Google Colab allows you to write and run Python code in the cloud, making it ideal for learning projects and prototyping. To get the most out of working in Colab, it's recommended to experiment with different code formats. This can include using different comment styles, structuring code with functions and classes, and writing clean and understandable code. Using Markdown to create explanatory notes and documentation within the notebook is also important. Experimenting with formatting can improve the readability and maintainability of your code, which is especially helpful when collaborating with other developers. Don't forget to save your changes regularly and use GitHub integration to manage versions of your project.

Read also:
The scalar product of vectors: formulas, definitions, and properties
The scalar product of vectors is one of the key operations in linear algebra, which allows find the relationship between two vectors. It is defined as the product of the lengths of the vectors and the cosine of the angle between them. The formula for calculating the dot product of vectors a and b is as follows: a b = |a| |b| cos(θ), where |a| and |b| are the lengths of the vectors and θ is the angle between them.
Properties of the dot product include commutativity (a b = b a), distributivity with respect to addition (a (b + c) = a b + a c), and associativity with respect to multiplication by a scalar (k(a b) = (ka) b = a (kb)). These properties make the dot product a useful tool for solving various problems in geometry and physics.
The dot product can also be expressed in terms of the coordinates of the vectors in space. If vectors a and b are given coordinates a = (a1, a2, a3) and b = (b1, b2, b3), then the dot product can be calculated using the formula: a · b = a1b1 + a2b2 + a3b3. This makes it easy to find the angle between vectors and determine their relative positions.
The dot product plays an important role in various fields of science and engineering, such as physics, computer graphics, and machine learning. Understanding its properties and applications will help you better navigate problems involving vectors and their interactions.
Learn more about programming and coding in our Telegram channel. Join us!
Also learn:
- What is Google Colab and how to work with it: everything a beginner needs to know
- Python for beginners: areas of application and capabilities
- The Turtle module in Python
Learn more interesting things about coding in our Telegram channel. Subscribe to updates and stay up to date with the latest news and trends in the programming world.

