Decomposition of a linear map into scale/rotation/shear matrices

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|cite|improve this question



















  • 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















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.










share|cite|improve this question



















  • 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













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.










share|cite|improve this question















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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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













  • 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











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.






share|cite|improve this answer




















  • 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











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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.






share|cite|improve this answer




















  • 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















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.






share|cite|improve this answer




















  • 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













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.






share|cite|improve this answer












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.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










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

















  • 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


















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































這個網誌中的熱門文章

Is there any way to eliminate the singular point to solve this integral by hand or by approximations?

Why am i infinitely getting the same tweet with the Twitter Search API?

Carbon dioxide