How to stack rotation matrices to operate on a matrix of samples?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I can operate on a $3times 1$ vector, $a$, with a $3times 3$ rotation matrix, $r$. Such that $r a=b$, another $3times 1$ vector.
If I have $N$ of these vectors and rotation matrices I can stack them to create matrix $A$ with dimension $3times N$ and matrix $R$ with dimension $3times 3times N$. Is there a way to make $R$ a $Ntimes N$ matrix that preserves its information? So that I can operate on $A$ from the right to find $B$? or $A^T$ from the left to find $B^T$
linear-algebra linear-transformations rotations
add a comment |Â
up vote
0
down vote
favorite
I can operate on a $3times 1$ vector, $a$, with a $3times 3$ rotation matrix, $r$. Such that $r a=b$, another $3times 1$ vector.
If I have $N$ of these vectors and rotation matrices I can stack them to create matrix $A$ with dimension $3times N$ and matrix $R$ with dimension $3times 3times N$. Is there a way to make $R$ a $Ntimes N$ matrix that preserves its information? So that I can operate on $A$ from the right to find $B$? or $A^T$ from the left to find $B^T$
linear-algebra linear-transformations rotations
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can operate on a $3times 1$ vector, $a$, with a $3times 3$ rotation matrix, $r$. Such that $r a=b$, another $3times 1$ vector.
If I have $N$ of these vectors and rotation matrices I can stack them to create matrix $A$ with dimension $3times N$ and matrix $R$ with dimension $3times 3times N$. Is there a way to make $R$ a $Ntimes N$ matrix that preserves its information? So that I can operate on $A$ from the right to find $B$? or $A^T$ from the left to find $B^T$
linear-algebra linear-transformations rotations
I can operate on a $3times 1$ vector, $a$, with a $3times 3$ rotation matrix, $r$. Such that $r a=b$, another $3times 1$ vector.
If I have $N$ of these vectors and rotation matrices I can stack them to create matrix $A$ with dimension $3times N$ and matrix $R$ with dimension $3times 3times N$. Is there a way to make $R$ a $Ntimes N$ matrix that preserves its information? So that I can operate on $A$ from the right to find $B$? or $A^T$ from the left to find $B^T$
linear-algebra linear-transformations rotations
edited Aug 1 at 21:32
Mauricio Cele Lopez Belon
54728
54728
asked Jul 31 at 19:23
Ian Campbell Moore
34
34
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14
add a comment |Â
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Short answer is almost. The long answer requires to do some precisions:
First, if you "stack" a $3 times 1$ column vector $N$ times you get a $3N times 1$ column vector, not a $3 times N$ matrix.
Second, the matrix $R$ should be $3N times 3N$ square matrix, as it has $N$ number of $3 times 3$ matrices on its diagonal and zeros everywhere esle.
So if you stack your $N$ vectors in a $3N times 1$ vectot $A$ and arrange your matrix $R$ of dimension $3N times 3N$ as described above you will get $ R A = B$ and $ A = R^T B$ as you want.
TL;DR
Now that will be extremely slow in a computer. In order to do better you will need to use sparse matrix multiplication since the matrix $R$ is sparse. However, I think doing the individual $3 times 3$ matrix multiplication with a $3 times 1$ column vector will be much faster since modern linear algebra libraries use vectorized instructions for those tiny matrices which would reduce the multiplication time by a factor of four.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Short answer is almost. The long answer requires to do some precisions:
First, if you "stack" a $3 times 1$ column vector $N$ times you get a $3N times 1$ column vector, not a $3 times N$ matrix.
Second, the matrix $R$ should be $3N times 3N$ square matrix, as it has $N$ number of $3 times 3$ matrices on its diagonal and zeros everywhere esle.
So if you stack your $N$ vectors in a $3N times 1$ vectot $A$ and arrange your matrix $R$ of dimension $3N times 3N$ as described above you will get $ R A = B$ and $ A = R^T B$ as you want.
TL;DR
Now that will be extremely slow in a computer. In order to do better you will need to use sparse matrix multiplication since the matrix $R$ is sparse. However, I think doing the individual $3 times 3$ matrix multiplication with a $3 times 1$ column vector will be much faster since modern linear algebra libraries use vectorized instructions for those tiny matrices which would reduce the multiplication time by a factor of four.
add a comment |Â
up vote
0
down vote
accepted
Short answer is almost. The long answer requires to do some precisions:
First, if you "stack" a $3 times 1$ column vector $N$ times you get a $3N times 1$ column vector, not a $3 times N$ matrix.
Second, the matrix $R$ should be $3N times 3N$ square matrix, as it has $N$ number of $3 times 3$ matrices on its diagonal and zeros everywhere esle.
So if you stack your $N$ vectors in a $3N times 1$ vectot $A$ and arrange your matrix $R$ of dimension $3N times 3N$ as described above you will get $ R A = B$ and $ A = R^T B$ as you want.
TL;DR
Now that will be extremely slow in a computer. In order to do better you will need to use sparse matrix multiplication since the matrix $R$ is sparse. However, I think doing the individual $3 times 3$ matrix multiplication with a $3 times 1$ column vector will be much faster since modern linear algebra libraries use vectorized instructions for those tiny matrices which would reduce the multiplication time by a factor of four.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Short answer is almost. The long answer requires to do some precisions:
First, if you "stack" a $3 times 1$ column vector $N$ times you get a $3N times 1$ column vector, not a $3 times N$ matrix.
Second, the matrix $R$ should be $3N times 3N$ square matrix, as it has $N$ number of $3 times 3$ matrices on its diagonal and zeros everywhere esle.
So if you stack your $N$ vectors in a $3N times 1$ vectot $A$ and arrange your matrix $R$ of dimension $3N times 3N$ as described above you will get $ R A = B$ and $ A = R^T B$ as you want.
TL;DR
Now that will be extremely slow in a computer. In order to do better you will need to use sparse matrix multiplication since the matrix $R$ is sparse. However, I think doing the individual $3 times 3$ matrix multiplication with a $3 times 1$ column vector will be much faster since modern linear algebra libraries use vectorized instructions for those tiny matrices which would reduce the multiplication time by a factor of four.
Short answer is almost. The long answer requires to do some precisions:
First, if you "stack" a $3 times 1$ column vector $N$ times you get a $3N times 1$ column vector, not a $3 times N$ matrix.
Second, the matrix $R$ should be $3N times 3N$ square matrix, as it has $N$ number of $3 times 3$ matrices on its diagonal and zeros everywhere esle.
So if you stack your $N$ vectors in a $3N times 1$ vectot $A$ and arrange your matrix $R$ of dimension $3N times 3N$ as described above you will get $ R A = B$ and $ A = R^T B$ as you want.
TL;DR
Now that will be extremely slow in a computer. In order to do better you will need to use sparse matrix multiplication since the matrix $R$ is sparse. However, I think doing the individual $3 times 3$ matrix multiplication with a $3 times 1$ column vector will be much faster since modern linear algebra libraries use vectorized instructions for those tiny matrices which would reduce the multiplication time by a factor of four.
answered Aug 1 at 21:51
Mauricio Cele Lopez Belon
54728
54728
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2868386%2fhow-to-stack-rotation-matrices-to-operate-on-a-matrix-of-samples%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please use MathJax to format your questions. You'll get a lot more readership if you do, I think.
– saulspatz
Jul 31 at 20:14