A vector is a geometric object which has both magnitude (i.e. length) and direction. A vector is generally represented by a line segment with a certain direction connecting the initial point A and the terminal point B as shown in the figure below and is denoted by
Projection of a Vector on another vector
The projection of a vector onto another vector is given as
Computing vector projection onto another vector in Python:
Projection of Vector u on Vector v is: [1.76923077 2.12307692 0.70769231]
One liner code for projecting a vector onto another vector:
Projection of a Vector onto a Plane
The projection of a vector onto a plane is calculated by subtracting the component of which is orthogonal to the plane from .
where, is the plane normal vector.
Computing vector projection onto a Plane in Python:
Projection of Vector u on Plane P is: [ 0.76470588 3.76470588 -0.64705882]
- Projection Profile method
- Classifying data using Support Vector Machines(SVMs) in Python
- Classifying data using Support Vector Machines(SVMs) in R
- Train a Support Vector Machine to recognize facial features in C++
- Python | Merge Python key values to list
- MySQL-Connector-Python module in Python
- Python | Convert list to Python array
- Python | Index of Non-Zero elements in Python list
- Important differences between Python 2.x and Python 3.x with examples
- Reading Python File-Like Objects from C | Python
- Python | Add Logging to Python Libraries
- Python | Sort Python Dictionaries by Key or Value
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Add Logging to a Python Script
- Python | Visualizing O(n) using Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.