title: How to extract position, rotation and scale from matrix SVG
body: <p>I have a simple problem: I want to extract translation (tx, ty), rotation (r) and scale (sx, sy) values form a transform matrix applied to my svg element.</p>
  
  <p>Let's use this example:</p>
  
  <pre><code>&lt;g
    id="myElement"
    transform="matrix(0.93893241,0.34410162,-0.34410162,0.93893241,363.88475,-76.125919)"
    &gt;... &lt;/g&gt;
  </code></pre>
  
  <p>If, in javascript I do</p>
  
  <pre><code>document.getElementById("myElement").getCTM()
  </code></pre>
  
  <p>I can access to a, b, c, d, e, f values. How can I get tx, ty, sx, sy and r from there?
  Thanks</p>