Decomposition of a linear map into scale/rotation/shear matrices
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
When I have a linear map
$$
A = pmatrixa & b \ c &d
$$
It obviously has 4 degrees of freedom. I would now like to decompose it into scale, rotation and sheer components:
$$
A = BCD = pmatrixs_1 & 0 \ 0 & s_2pmatrixcos alpha & -sin alpha \ sin alpha & cos alpha pmatrix1 & s_3 \ s_4 & 1
$$
Or a similar decomposition. My problem here is, that I know have 5 degrees of freedom, so at least one variable must be a function of the others.
I suspect that there $BC$ isn't uniquely defined this way and shear can be expressed in one dimension combined with the correct rotation, but I do not know what's the actual decomposition I am looking for.
Some resources on shear maps suggest that your define horizontal $s_4=0$ or vertical ($s_3=0$) shear maps, so it is area preserving. But my map $A$ is a general transformation between two arbitrary (non-degenerate) triangles, so there are no such constraints and most transformations will need a non-area-preserving term.
linear-transformations
 |Â
show 2 more comments
up vote
3
down vote
favorite
When I have a linear map
$$
A = pmatrixa & b \ c &d
$$
It obviously has 4 degrees of freedom. I would now like to decompose it into scale, rotation and sheer components:
$$
A = BCD = pmatrixs_1 & 0 \ 0 & s_2pmatrixcos alpha & -sin alpha \ sin alpha & cos alpha pmatrix1 & s_3 \ s_4 & 1
$$
Or a similar decomposition. My problem here is, that I know have 5 degrees of freedom, so at least one variable must be a function of the others.
I suspect that there $BC$ isn't uniquely defined this way and shear can be expressed in one dimension combined with the correct rotation, but I do not know what's the actual decomposition I am looking for.
Some resources on shear maps suggest that your define horizontal $s_4=0$ or vertical ($s_3=0$) shear maps, so it is area preserving. But my map $A$ is a general transformation between two arbitrary (non-degenerate) triangles, so there are no such constraints and most transformations will need a non-area-preserving term.
linear-transformations
1
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
1
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
1
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
1
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12
 |Â
show 2 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
When I have a linear map
$$
A = pmatrixa & b \ c &d
$$
It obviously has 4 degrees of freedom. I would now like to decompose it into scale, rotation and sheer components:
$$
A = BCD = pmatrixs_1 & 0 \ 0 & s_2pmatrixcos alpha & -sin alpha \ sin alpha & cos alpha pmatrix1 & s_3 \ s_4 & 1
$$
Or a similar decomposition. My problem here is, that I know have 5 degrees of freedom, so at least one variable must be a function of the others.
I suspect that there $BC$ isn't uniquely defined this way and shear can be expressed in one dimension combined with the correct rotation, but I do not know what's the actual decomposition I am looking for.
Some resources on shear maps suggest that your define horizontal $s_4=0$ or vertical ($s_3=0$) shear maps, so it is area preserving. But my map $A$ is a general transformation between two arbitrary (non-degenerate) triangles, so there are no such constraints and most transformations will need a non-area-preserving term.
linear-transformations
When I have a linear map
$$
A = pmatrixa & b \ c &d
$$
It obviously has 4 degrees of freedom. I would now like to decompose it into scale, rotation and sheer components:
$$
A = BCD = pmatrixs_1 & 0 \ 0 & s_2pmatrixcos alpha & -sin alpha \ sin alpha & cos alpha pmatrix1 & s_3 \ s_4 & 1
$$
Or a similar decomposition. My problem here is, that I know have 5 degrees of freedom, so at least one variable must be a function of the others.
I suspect that there $BC$ isn't uniquely defined this way and shear can be expressed in one dimension combined with the correct rotation, but I do not know what's the actual decomposition I am looking for.
Some resources on shear maps suggest that your define horizontal $s_4=0$ or vertical ($s_3=0$) shear maps, so it is area preserving. But my map $A$ is a general transformation between two arbitrary (non-degenerate) triangles, so there are no such constraints and most transformations will need a non-area-preserving term.
linear-transformations
linear-transformations
edited Sep 4 at 9:01
asked Sep 4 at 7:58
allo
1164
1164
1
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
1
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
1
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
1
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12
 |Â
show 2 more comments
1
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
1
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
1
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
1
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12
1
1
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
1
1
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
1
1
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
1
1
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null.
You can eliminate one parameter by applying the conservation of parallelism.
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null.
You can eliminate one parameter by applying the conservation of parallelism.
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
add a comment |Â
up vote
1
down vote
A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null.
You can eliminate one parameter by applying the conservation of parallelism.
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
add a comment |Â
up vote
1
down vote
up vote
1
down vote
A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null.
You can eliminate one parameter by applying the conservation of parallelism.
A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null.
You can eliminate one parameter by applying the conservation of parallelism.
answered Sep 4 at 9:19
Shaktyai
1412
1412
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
add a comment |Â
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
I actually even want to parameterize an affine transformation, but I use it already in the Form $A+t$, so I just need to decompose $A$. Can you elaborate on what matrices you construct for the conservation of parallelism you're mentioning?
â allo
Sep 4 at 9:21
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
u(a,b)//v(c,d) <=> det(u,v)=0 Apply the mapping to both u and v and check the images u',v' are still parallel
â Shaktyai
Sep 4 at 16:32
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%2f2904766%2fdecomposition-of-a-linear-map-into-scale-rotation-shear-matrices%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
1
I think that the decomposition you are looking for is not unique. since with a scaling and a sheer you can make a rotation
â giannispapav
Sep 4 at 8:07
1
If the matrix is square, eigen-decomposition can provide rotation and scaling matrices. For a non-square matrix, SVD can provide the rotation and scaling. I don't know how to get the shear matrix.
â user146290
Sep 4 at 8:16
I already thought about this. As far as I understand this, the SVD is more or less: rotate into a reference coordinate system, rescale, rotate back, see eg. de.wikipedia.org/wiki/Datei:Singular-Value-Decomposition.svg in Wikipedia. But this seems not to separate scaling and shearing, as S is a scaling matrix in another coordinate system.
â allo
Sep 4 at 8:32
1
The scaling ($B$) component provides all of the area scaling that you might need.
â amd
Sep 4 at 9:31
1
I donâÂÂt know of any particularly clean way to compute such a decomposition, if it exists. You could certainly expand the matrix product and then solve for the various parameters, but the resulting expressions are quite unwieldy, and IâÂÂm not sure that there are real solutions for all real matrices. On the other hand, if youâÂÂre willing to put the rotation either first or last in the sequence, then you can start from a $QR$ or polar decomposition and break down the upper-triangular or PSD matrix further.
â amd
Sep 7 at 6:12