Given the x, y and z coordinates of three vectors, the task is to check if they are at equilibrium or not.
Input: x1 = -2, y1 = 1, z1 = 0, x2 = 5, y2 = 0, z2 = 5, x3 = -3, y3 = -1, z3 = -5
Output: The vectors are at equilibrium.
Input: x1 = 2, y1 = -17, z1 = 0, x2 = 5, y2 = 1, z2 = -5, x3 = 4, y3 = 2, z3 = -4
Output: The vectors are not at equilibrium.
When Three vectors are at equilibrium
Approach: Three vectors are at equilibrium when the results of those three vectors is a Null vector, i.e. it has no magnitude and direction. Resultant of three vectors is equal to the vector sum of the vectors. The resultant vector is Null when, ∑x = 0, ∑y = 0 and ∑ z = 0. Thus we can say that when the said condition satisfies then the vectors are at equilibrium and otherwise not.
The vectors are at equilibrium.
- Minimum distance from a point to the line segment using Vectors
- Find area of triangle if two vectors of two adjacent sides are given
- Find area of parallelogram if vectors of two adjacent sides are given
- Program for dot product and cross product of two vectors
- Check whether it is possible to convert A into B
- Check n^2 - m^2 is prime or not
- Check divisibility by 7
- Check whether N is a Factorion or not
- Check whether the exchange is possible or not
- Check whether a given number is even or odd
- Check if a number can be expressed as 2^x + 2^y
- Check if a number is divisible by 41 or not
- Check whether XOR of all numbers in a given range is even or odd
- Check if a number is divisible by 23 or not
- Check if two Integer are anagrams of each other
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.