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.
- 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 a given number is even or odd
- Check n^2 - m^2 is prime or not
- Check divisibility by 7
- Check whether N is a Factorion or not
- Check whether it is possible to convert A into B
- Check if N is a Factorial Prime
- Check if N is Strong Prime
- Check whether a number is semiprime or not
- Check whether a + b = c or not after removing all zeroes from a,b and c
- Check if two numbers are co-prime or not
- Check if a number can be expressed as 2^x + 2^y
- Check whether a number is Emirpimes or not
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.