Conic Normal Form of a Real 2 × 2 Matrix

Tony Thrall <tthrall@StanfordAlumni.org>, 19-April-2005:

In example 4, section 1.1, of Reference 1, the author presents certain normal forms of real 2 × 2 matrices.  I have written Mathematica function conicReduceM2R to calculate the conjugation matrix required to transform a given real numeric matrix to its normal form.  Subsequent sections of this notebook contain the function definition and supporting material.  The reader is invited to copy and modify the code, with my request for acknowledgement in consequent publications.  The mathematics underlying the code is presented in Reference 2.

Reference 1: Wulf Rossmann, Lie groups: an introduction through linear groups, Oxford University Press, New York, 2004.

Reference 2: <conic_normal_form_2D.pdf> submitted for publication

Explore

Assuming[{a, b, c, d}∈Reals, f[]]

Define discrim

discrim[{{a_,  b_},  {c_,  
            d_}}]  :=  (a  -  d)^2  +  (4 b c)

discRoot[{{a_,  b_},  {c_,  d_}}]  :=  
      Sqrt[discrim[ {{a,  b},  {c,  d}} ]]

Define discrimReal

discrimReal[{{a_,  b_},  {c_,  d_}}]  :=  
      Assuming[{a,  b,  c,  d} ∈ Reals,  
        Simplify[
(a  -  
                  d)^2  +  (4 b c)
]]

discRootReal[{{a_,  b_},  {c_,  d_}}]  :=  
      Assuming[{a,  b,  c,  d} ∈ Reals,  
        Simplify[
Sqrt[
            discrimReal[ {{a,  b},  {c,  
                  d}} ]]
]]

Test discrimReal

discrimReal[ {{a,  b},  {c,  d}} ]

discRootReal[ {{a,  b},  {c,  d}} ]

Simplify[ discRootReal[ {{a,  0},  {0,  d}} ] ]

Simplify[ 
      discRootReal[ {{0,  - Sin[θ]},  {Sin[θ],  
            0}} ] ]

Assuming[ {a,  b,  c,  d} ∈ Reals,  
      Abs[a  -  d]  <  a  -  d ]

Assuming[ {a,  b,  c,  d} ∈ Reals,  
      Cosh[a]  <  Sinh[a] ]

Assuming[ {a,  b,  c,  d} ∈ Reals,  
      Cosh[a]^2  <  Sinh[a]^2 ]

Simplify[Cosh[a]^2  -  Sinh[a]^2]

Test discrim

discrim[ {{a,  b},  {c,  d}} ]

discRoot[ {{a,  b},  {c,  d}} ]

Simplify[ discRoot[ {{a,  0},  {0,  d}} ] ]

Simplify[ 
      discRoot[ {{0,  - Sin[θ]},  {Sin[θ],  
            0}} ] ]

Characteristic values and vectors

Mathematica Eigenvalues and Eigenvectors

eAvalues  =  Eigenvalues[(A  =  {{a, b}, {c, d}})]

eAvectors  =  Eigenvectors[A]

pAvectors  =  
      Simplify[ 
        Assuming[{a,  b,  c,  d} ∈ Reals,  
          2 c eAvectors] ]

Options for symbolic characteristic vectors

Clear[ singVectors01,  singVectors02 ]

singVectors01[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Simplify[ 
        Assuming[{a,  b,  c,  d} ∈ 
            Reals,  
{{a,  b},  {c,  
                d}}  -  Eigenvalues[ {{a,  b},  {c,  
                      d}} ] [[1]] IdentityMatrix[
                2]
] ]

singVectors01[ {{a,  b},  {c,  d}} ] // MatrixForm

singVectors02[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Simplify[ 
        Assuming[{a,  b,  c,  d} ∈ 
            Reals,  
{{a,  b},  {c,  
                d}}  -  Eigenvalues[ {{a,  b},  {c,  
                      d}} ] [[2]] IdentityMatrix[
                2]
] ]

singVectors02[ {{a,  b},  {c,  d}} ] // MatrixForm

Clear[ eM0101,  eM0102,  eM0201,  eM0202 ]

Clear[ det0101,  det0102,  det0201,  det0202 ]

eM0101

eM0101[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Block[{A,  sVecs01,  sVecs02}, 
A  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ 
                Reals,  {{a,  b},  {c,  
                  d}}] ]; 
sVecs01  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors01[A]] ]; 
sVecs02  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors02[A]] ]; 
Simplify[ 
          Assuming[{a,  b,  c,  d} ∈ 
              Reals,  
{{- 
                  sVecs02 [[1,  2]],  - 
                  sVecs01 [[1,  2]]},  {sVecs02 [[1,  1]],  
                sVecs01 [[1,  1]]}}]]
]

eM0101[ {{a,  b},  {c,  d}} ] // MatrixForm

(test0101  =  
          Simplify[
{{a,  b},  {c,  d}} . 
                eM0101[ {{a,  b},  {c,  d}} ]  -  
              eM0101[ {{a,  b},  {c,  d}} ] . 
                DiagonalMatrix[{Eigenvalues[{{a,  b},  {c,  
                            d}}] [[2]],  Eigenvalues[{{a,  
                            b},  {c,  
                            d}}] [[1]]}]
]) // 
      MatrixForm

Det[eM0101[ {{a,  b},  {c,  d}} ]]

eM0102

eM0102[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Block[{A,  sVecs01,  sVecs02}, 
A  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ 
                Reals,  {{a,  b},  {c,  
                  d}}] ]; 
sVecs01  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors01[A]] ]; 
sVecs02  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors02[A]] ]; 
Simplify[ 
          Assuming[{a,  b,  c,  d} ∈ 
              Reals,  
{{sVecs02 [[1,  2]],  - 
                  sVecs01 [[2,  2]]},  {- 
                  sVecs02 [[1,  1]],  
                sVecs01 [[2,  1]]}}]]
]

eM0102[ {{a,  b},  {c,  d}} ] // MatrixForm

(test0102  =  
          Simplify[
{{a,  b},  {c,  d}} . 
                eM0102[ {{a,  b},  {c,  d}} ]  -  
              eM0102[ {{a,  b},  {c,  d}} ] . 
                DiagonalMatrix[{Eigenvalues[{{a,  b},  {c,  
                            d}}] [[2]],  Eigenvalues[{{a,  
                            b},  {c,  
                            d}}] [[1]]}]
]) // 
      MatrixForm

Det[eM0102[ {{a,  b},  {c,  d}} ]]

det0102[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Simplify[ 
        Assuming[{a,  b,  c,  d} ∈ 
            Reals,  
Sqrt[
              discr[ {{a,  b},  {c,  d}} ]] (Sqrt[
                    discr[ {{a,  b},  {c,  d}} ]]  -  (a  -  
                      d))/2
]]

det0102[ {{a,  b},  {c,  d}} ]

Simplify[
      Det[eM0102[ {{a,  b},  {c,  d}} ]]  -  
        det0102[ {{a,  b},  {c,  d}} ]]

eM0201

eM0201[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Block[{A,  sVecs01,  sVecs02}, 
A  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ 
                Reals,  {{a,  b},  {c,  
                  d}}] ]; 
sVecs01  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors01[A]] ]; 
sVecs02  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors02[A]] ]; 
Simplify[ 
          Assuming[{a,  b,  c,  d} ∈ 
              Reals,  
{{- 
                  sVecs02 [[2,  2]],  - 
                  sVecs01 [[1,  2]]},  {sVecs02 [[2,  1]],  
                sVecs01 [[1,  1]]}}]]
]

eM0201[ {{a,  b},  {c,  d}} ] // MatrixForm

(test0201  =  
          Simplify[
{{a,  b},  {c,  d}} . 
                eM0201[ {{a,  b},  {c,  d}} ]  -  
              eM0201[ {{a,  b},  {c,  d}} ] . 
                DiagonalMatrix[{Eigenvalues[{{a,  b},  {c,  
                            d}}] [[2]],  Eigenvalues[{{a,  
                            b},  {c,  
                            d}}] [[1]]}]
]) // 
      MatrixForm

Det[eM0201[ {{a,  b},  {c,  d}} ]]

det0201[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Simplify[ 
        Assuming[{a,  b,  c,  d} ∈ 
            Reals,  
Sqrt[
              discr[ {{a,  b},  {c,  d}} ]] ((a  -  d)  +  
                  Sqrt[discr[ {{a,  b},  {c,  d}} ]])/
              2
]]

det0201[ {{a,  b},  {c,  d}} ]

Simplify[
      Det[eM0201[ {{a,  b},  {c,  d}} ]]  -  
        det0201[ {{a,  b},  {c,  d}} ]]

eM0202

eM0202[ {{a_,  b_},  {c_,  d_}} ]  :=  
      Block[{A,  sVecs01,  sVecs02}, 
A  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ 
                Reals,  {{a,  b},  {c,  
                  d}}] ]; 
sVecs01  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors01[A]] ]; 
sVecs02  =  
          Simplify[ 
            Assuming[{a,  b,  c,  d} ∈ Reals,  
              singVectors02[A]] ]; 
Simplify[ 
          Assuming[{a,  b,  c,  d} ∈ 
              Reals,  
{{- 
                  sVecs02 [[2,  2]],  - 
                  sVecs01 [[2,  2]]},  {sVecs02 [[2,  1]],  
                sVecs01 [[2,  1]]}}]]
]

eM0202[ {{a,  b},  {c,  d}} ] // MatrixForm

(test0202  =  
          Simplify[
{{a,  b},  {c,  d}} . 
                eM0202[ {{a,  b},  {c,  d}} ]  -  
              eM0202[ {{a,  b},  {c,  d}} ] . 
                DiagonalMatrix[{Eigenvalues[{{a,  b},  {c,  
                            d}}] [[2]],  Eigenvalues[{{a,  
                            b},  {c,  
                            d}}] [[1]]}]
]) // 
      MatrixForm

Det[eM0202[ {{a,  b},  {c,  d}} ]]

Mathematica Matrix reduction

SchurDecomposition[(A  =  {{a, b}, {c, d}})]

QRDecomposition[A]

Assuming[ {a,  b,  c,  d} ∈ Reals,  
        QRDecomposition[A] ] // Simplify

Assuming[ {a,  b,  c,  d} ∈ Reals,  
      QRDecomposition[A] ]

Assuming[ {a,  b,  c,  d} ∈ Reals,  
      Simplify[ QRDecomposition[A] ] ]

(q  =  Assuming[ {a,  b,  c,  d} ∈ Reals,  
              Simplify[ QRDecomposition[A] ] ] [[1]]) // 
      MatrixForm

(t  =  Assuming[ {a,  b,  c,  d} ∈ Reals,  
              Simplify[ QRDecomposition[A] ] ] [[2]]) // 
      MatrixForm

Scale equalization

(symP  =  {{α,  0},  {β,  α}}) // 
      MatrixForm

(syD  =  DiagonalMatrix[{γ,  δ}]) // 
      MatrixForm

Inverse[syD] // MatrixForm

(newP  =  Inverse[syD] . symP . syD // Simplify) // 
      MatrixForm

canonicalConicM2R

ellipM2R

Define ellipM2R

Clear[ellipM2R]

ellipM2R[r_,  θ_]  :=  
      Simplify[ 
        r {{Cos[θ],  - Sin[θ]},  {Sin[θ],  
              Cos[θ]}} ]

Test ellipM2R

Clear[testEllip]

(testEllip  =  ellipM2R[5,  ArcTan[3,  4]]) // 
      MatrixForm

hypM2R

Define hypM2R

Clear[hypM2R]

hypM2R[r_,  θ_]  :=  
      Simplify[ 
        r {{Cosh[θ],  Sinh[θ]},  {Sinh[θ],  
              Cosh[θ]}} ]

Test hypM2R

Clear[testHyp]

(testHyp  =  hypM2R[3,  ArcTanh[4/5]]) // MatrixForm

parabM2R

Define parabM2R

Clear[parabM2R]

parabM2R[r_,  θ_]  :=  
      Simplify[ 
        r {{Cos[θ],  0},  {Sin[θ],  
              Cos[θ]}} ]

Test parabM2R

Clear[testParab]

(testParab  =  parabM2R[5,  ArcTan[3,  4]]) // 
      MatrixForm

scalarM2R

Define scalarM2R

Clear[scalarM2R]

scalarM2R[scalar_]  :=  
      Simplify[ scalar IdentityMatrix[2] ]

Test scalarM2R

Clear[testScalar]

(testScalar  =  scalarM2R[3]) // MatrixForm

Test cases

define example conic matrices

Clear[ellipA,  hypA,  parabA,  scalarA]

ellipA = (({{3, -4}, {4, 3}}))

hypA = (({{5, 4}, {4, 5}}))

parabA = (({{3, 0}, {4, 3}}))

scalarA = (({{3, 0}, {0, 3}}))

define some transformation matrices

Clear[rotateM,  unRotateM,  squishM,  
      unSquishM]

(rotateM  =  ellipM2R[1,  Pi/4]) // MatrixForm

(unRotateM  =  Inverse[ rotateM ]) // MatrixForm

(squishM  =  hypM2R[1,  ArcTanh[4/5]]) // MatrixForm

(unSquishM  =  Inverse[ squishM ]) // MatrixForm

spectrumM2R

spectrumM2R

Define spectrumM2R

Clear[spectrumM2R]

spectrumM2R[ {{a_,  b_},  {c_,  d_}} ] := Block[
(* 
Given real 2 × 2 numeric matrix A,  
            return 

            {eMat,  eVals} where 

            A . eMat  ==  eMat . diag (eVals)
 *)

(* 
Notes 

            (1) return values may be complex 

            (2) 
              if A has only one eignevector set 

            2  nd column of eMat to zero 

            2  nd elt of eVals to 1  st elt 

            (3) 1  
              st elt of eVals is the larger or 

            has positive imaginary part
 *)

{discrim,  commonFactor  =  1,  x,  eVals,  eMat},

discrim  =  
              Assuming[{a,  b,  c,  d} ∈ Reals,  
                Simplify[
(a  -  
                          d)^2  +  (4 b c)
]];

eVals  =  
              Assuming[{a,  b,  c,  d} ∈ Reals,  
                Simplify[
{a + d + Sqrt[discrim], 
                      a + d - Sqrt[discrim]}/2
]];

eMat = Assuming[{a,  b,  c,  d} ∈ Reals, Simplify[ 
Which[ 
(b  ==  
                              0)  ∧  (c  ==  0),
(* A is a diagonal matrix *)
Which[ 
a  <  d,
(* list larger eigenvalue first *)
{{0,  1},  {1,  0}},
True,
IdentityMatrix[2]
],
(discrim  ≠  
                              0)  ∧  (c  ≠  0),
(* distinct eigenvectors,  
                            c  ≠  0 *)
{{a - d + Sqrt[discrim], 
                            a - d - Sqrt[discrim]}, {2 c, 2 c}},
(discrim  ≠  
                              0)  ∧  (c  ==  0),
Which[
a  <  d,
(* distinct eigenvectors,  
                                c  ==  0,  a  <  d *)
{{b,  
                                1},  {d  -  a,  0}},
True,
(* distinct eigenvectors,  
                                c  ==  0,  a  >  d *)
{{1, b}, {0, 
                                d  -  a}}
],
(discrim  ==  0)  ∧  (c  ≠  0),
(* single eigenvector,  
                            c  ≠  0 *)
{{a - d, 0}, {2 c, 0}},
(discrim  ==  
                              0)  ∧  (b  ≠  0),
(* single eigenvector,  
                            c  ==  0,  b  ≠  0,  
                            a  ==  d *)
{{1,  0},  {0,  0}},
True,
(* A is undetermined *)
Null
]]];

(* simplify eMat *)
commonFactor = If[ MatrixQ[eMat],
Assuming[{a,  b,  c,  
                        d} ∈ Reals,  
                    Simplify[ 
FactorTermsList[ 
                          Flatten[eMat] . 
                            Table[ 
                              x^j,  {j,  0,  
                                3} ] ] [[1]]
]],
(* else *)
1];
eMat  =  
              If[ MatrixQ[eMat], eMat/commonFactor ];

{eMat,  eVals}]

examine symbolic case

Clear[eM,  eV,  testM,  A]

(A  =  {{s,  t},  {u,  v}}) // MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

Test ellipA

Clear[eM,  eV,  testM,  A]

(A  =  ellipA) // MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Test hypA

Clear[eM,  eV,  testM,  A]

(A  =  hypA) // MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Test parabA

Clear[eM,  eV,  testM,  A]

(A  =  parabA) // MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Test scalarA

Clear[eM,  eV,  testM,  A]

(A  =  scalarA) // MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Re-test ellipA

Clear[eM,  eV,  testM,  A]

(A  =  Simplify[unSquishM . ellipA . squishM]) // 
      MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Re-test hypA

Clear[eM,  eV,  testM,  A]

(A  =  Simplify[unRotateM . hypA . rotateM]) // 
      MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Re-test parabA

Clear[eM,  eV,  testM,  A]

(A  =  Simplify[unRotateM . parabA . rotateM]) // 
      MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Clear[eM,  eV,  testM,  A]

(newParabA  =  {{3,  -1},  {1,  5}}) // 
      MatrixForm

A  =  newParabA

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Clear[eM,  eV,  testM,  A]

(A  =  Simplify[unSquishM . newParabA . squishM]) // 
      MatrixForm

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

Clear[eM,  eV,  testM,  A]

newTestParabM = (({{4, 0}, {2, 4}}))

A  =  newTestParabM

{eM,  eV}  =  spectrumM2R[ A ]

eM // MatrixForm

(testM  =  Simplify[A . eM  -  eM . DiagonalMatrix[eV]]) // 
      MatrixForm

conicReduceM2R

conicReduceM2R

Define conicReduceM2R

Clear[conicReduceM2R]

conicReduceM2R[ {{a_,  b_},  {c_,  d_}} ] := Block[
(* 
Given real 2 × 2 numeric matrix A, return 
{conicM,  tM} where 
conicM  ==  
                  (tM^(-1)) . A . tM 
is one of the following forms 
with α real and β positive 

scalar --     (({{α, 0}, {0, α}})) 
parabolic --  (({{α, 0}, {1, α}}))
hyperbolic -- (({{α, β}, {β, α}}))
elliptic --   (({{α, -β}, {β, α}}))
 *)

{
discrim,  x,  
            commonFactor  =  1,  
A,  conicM,  tM,  
            eigenM,  
hypM  =  {{1,  1},  {-1,  
                  1}},  
ellipM  =  {{1,  I},  {I,  
                  1}}
},

A  =  
              Assuming[{a,  b,  c,  d} ∈ Reals,  
                Simplify[{{a,  b},  {c,  d}}]];
discrim  =  
              Assuming[{a,  b,  c,  d} ∈ Reals,  
                Simplify[(a  -  d)^2  +  (4 b c)]];
eigenM  =  spectrumM2R[
                  A] [[1]];

tM = Assuming[{a,  b,  c,  d} ∈ Reals, Simplify[
Which[ 
(b  ==  
                              0)  ∧  (c  ==  0),
(* A is diagonal *)
Which[ a  ==  d,
(* scalar case *)
IdentityMatrix[2],
a  >  d,
(* hyperbolic case,  a  >  d *)
hypM,
a  <  d,
(* hyperbolic case,  a  <  d *)
Transpose[hypM],
True,
(* A is an indeterminate diagonal matrix *)
Null
],
(* A is non - diagonal *)
discrim  >  0,
(* hyperbolic case,  λ  =  α  ±  β *)
eigenM . hypM,
discrim  <  0,
(* elliptic case,  λ  =  α  ±  I β *)
eigenM . ellipM,
discrim  ==  0,
(* parabolic case,  λ  =  α *)
Which[ 
(b  ≠  
                                  0)  ∧  (c  ≠  0),
(* parabolic case,  
                                a  ≠  d *)
{{(a - 
                                      d)/(2 b),  b  - c},  {1,  
                                2 c (b  -  c)/(a - d)}},
(b  ≠  
                                  0)  ∧  (c  ==  0),
(* parabolic case,  
                                a  ==  d,  c  ==  0 *)
{{0,  b},  {1,  0}},
(b  ==  
                                  0)  ∧  (c  ≠  0),
(* parabolic case,  
                                a  ==  d,  b  ==  0 *)
{{1,  0},  {0,  
                                c}}
],
True,
(* undetermined *)
Null
]]];

(* simplify tM *)
commonFactor = If[ MatrixQ[tM],
Assuming[{a,  b,  c,  
                        d} ∈ Reals,  
                    Simplify[ 
FactorTermsList[ 
                          Flatten[tM] . 
                            Table[ 
                              x^j,  {j,  0,  
                                3} ] ] [[1]]
]],
(* else *)
1];
tM  =  
              If[ MatrixQ[tM], tM/commonFactor ];

conicM = If[ MatrixQ[tM],
Assuming[{a,  b,  c,  
                        d} ∈ Reals,  
                    Simplify[ Inverse[tM] . A . tM ]],
(* else *)
Null
];

{conicM,  tM}]

examine symbolic case

Clear[cM,  tM,  A]

(A  =  {{s,  t},  {u,  v}}) // MatrixForm

{cM,  tM}  =  conicReduceM2R[ A ]

Test ellipA

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ ellipA ]

cM // MatrixForm

tM // MatrixForm

Test hypA

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ hypA ]

cM // MatrixForm

tM // MatrixForm

Test parabA

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ parabA ]

cM // MatrixForm

tM // MatrixForm

(newParabA  =  {{3,  -1},  {1,  5}}) // 
      MatrixForm

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ newParabA ]

cM // MatrixForm

tM // MatrixForm

Test scalarA

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ scalarA ]

cM // MatrixForm

tM // MatrixForm

Re-test ellipA

Clear[cM,  tM]

unSquishM . ellipA . squishM // Simplify // MatrixForm

{cM,  tM}  =  
      conicReduceM2R[ unSquishM . ellipA . squishM ]

cM // MatrixForm

tM // MatrixForm

Re-test hypA

Clear[cM,  tM]

unRotateM . hypA . rotateM // Simplify // MatrixForm

{cM,  tM}  =  
      conicReduceM2R[ unRotateM . hypA . rotateM ]

cM // MatrixForm

tM // MatrixForm

Re-test parabA

Clear[cM,  tM]

unRotateM . parabA . rotateM // Simplify // MatrixForm

{cM,  tM}  =  
      conicReduceM2R[ unRotateM . parabA . rotateM ]

cM // MatrixForm

tM // MatrixForm

(newParabA  =  {{3,  -1},  {1,  5}}) // 
      MatrixForm

Clear[cM,  tM]

{cM,  tM}  =  conicReduceM2R[ newParabA ]

cM // MatrixForm

tM // MatrixForm

unRotateM . newParabA . rotateM // Simplify // 
      MatrixForm

unSquishM . newParabA . squishM // Simplify // 
      MatrixForm

Clear[cM,  tM]

{cM,  tM}  =  
      conicReduceM2R[ unSquishM . newParabA . squishM ]

cM // MatrixForm

tM // MatrixForm