Hello, basically I just don't understand its explanation.
I also do not know what kind of formula it is used.. (It does look like it used some kinda formula)
Thank you very much if you can explain it well!!
arealinear algebravectors
Hello, basically I just don't understand its explanation.
I also do not know what kind of formula it is used.. (It does look like it used some kinda formula)
Thank you very much if you can explain it well!!
There are two possibilities here:
There's the concept of an orthogonal matrix. Note that this is about a single matrix, not about two matrices. An orthogonal matrix is a real matrix that describes a transformation that leaves scalar products of vectors unchanged. The term "orthogonal matrix" probably comes from the fact that such a transformation preserves orthogonality of vectors (but note that this property does not completely define the orthogonal transformations; you additionally need that the length is not changed either; that is, an orthonormal basis is mapped to another orthonormal basis). Another reason for the name might be that the columns of an orthogonal matrix form an orthonormal basis of the vector space, and so do the rows; this fact is actually encoded in the defining relation $A^TA = AA^T = I$ where $A^T$ is the transpose of the matrix (exchange of rows and columns) and $I$ is the identity matrix.
Usually if one speaks about orthogonal matrices, this is what is meant.
One can indeed consider matrices as vectors; an $n\times n$ matrix is then just a vector in an $n^2$-dimensional vector space. In such a vector space, one can then define a scalar product just as in any other vector space. It turns out that for real matrices, the standard scalar product can be expressed in the simple form $$\langle A,B\rangle = \operatorname{tr}(AB^T)$$ and thus you can also define two matrices as orthogonal to each other when $\langle A,B\rangle = 0$, just as with any other vector space.
To imagine this, you simply forget that the matrices are matrices, and just consider all matrix entries as components of a vector. The two vectors then are orthogonal in the usual sense.
No need for trig, poorly conditioned calcs of $θ$, or matrices
You did correctly intuit that you need the "right" Vector Product(s)
the Vector Algebra taught in High School, early Undergrad today is Gibbs Vector Algebra which, though stuck in 3D, can be used for 2D calcs like this although some may never see or use the Vector Triple Product used in the below expression for rotating the Green vector to create the Red output vector
To use the Gibbs 3D Cross Product with the 2D vectors of the problem, the 2D vectors can be temporarily "promoted" to 3D vectors by augmenting each with a $z = 0$ component
then the Gibbs Vector Algebra formula for rotating g (3D vector derived from the 2D Green) by the angle between p, b (3D vectors derived from the 2D Purple, Blue, resp.) is:
$\left(\left(p\cdot b\right)g+(p\times b)\times g\right)/\begin{vmatrix}p\end{vmatrix}$
For coding the operation you may want to go down to the Vector Component level depending on your programing language, environment choices
1st a little help from GeoGebra's Computer Algebra System with the Triple Cross Product term:
Still requires hand massaging (as is typical of CAS output) but shows the simplifications with the $z$ components zero in all of the input and output vectors
Adding in by hand the Dot Product term and the Normalization,
the final by component rendering isn't that daunting:
(dropping the temporary z component to get a 2D output)
$(r_{x},\;r_{y}) =$ $\left[\left(p_{x}b_{x}+p_{y}b_{y}\right)g_{x}+(b_{x}p_{y}-b_{y}p_{x})g_{y},\;\left(p_{x}b_{x}+p_{y}b_{y}\right)g_{y}+(b_{y}p_{x}-b_{x}p_{y})g_{x}\right]/\sqrt{p_{x}^{2}+p_{y}^{2}}$
The equations could still have typos but the method is verified in a "live" dynamic geometry GeoGebra worksheet I uploaded to Geogebra:
https://www.geogebra.org/m/hASsFa5F
pic below is static, the Geogebra link should get you to the live worksheet where the spherical points at the heads of of the input vectors can be dragged with the result updating dynamically (although I did the full normalization of the Rotor there so the output magnitude is independent of both Purple, Blue magnitudes, only tracks Green)
The pink z axis vector is the $(p\times b)$ term, which, together with $\left(p\cdot b\right)$ are the components of a 2D Rotor expressed in Gibbs 3D Vector Algebra
The Rotor is a good object to encode the rotation with, particularly with the input given as a pair of vectors $p, b$
If you want to reverse the sense of the output angle rotation relative to the input vector pair ording, just change the sign in front of the $(p\times b)$ term
The Rotor equation is simpler in Geometric Algebra which I highly recommend even though the final calculation from components ends up the same
The wedge product of Geometric Algebra works in any dimension so the "promotion/demotion" step to use the Gibbs 3D Cross Product isn't required in GA, everything can stay in 2D
There are now many online (and dead tree) Geometric Algebra resources: Geometric Algebra for Computer Graphics may be especially relevant to this question
Best Answer
Hint: Calculate the length of these two vectors and find the angle between them using inner product. After getting the height use the area formula.