5
$\begingroup$
A = {{1 - λ, 2 λ - 1, λ},
     {λ, λ^2, -λ}, {1 + λ^2, λ^3 + λ - 1, -λ^2}}

How to reduce the above λ-matrix to the following Smith standard form:

{{1, 0, 0}, {0, λ, 0}, {0, 0, λ^2 + λ}}
$\endgroup$
  • $\begingroup$ SmithDecomposition works if lambda is numeric. $\endgroup$ – Michael E2 Jan 21 at 2:50
  • $\begingroup$ The following kglr's answer solves my problem, but I don't know where to get built-in functions that are not shown in help documents like ControlPCSSmithForm. $\endgroup$ – Please Correct GrammarMistakes Jan 21 at 3:06
7
$\begingroup$
Control`PCS`SmithForm[A, λ] // MatrixForm // TeXForm

$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \lambda (\lambda +1) \\ \end{array} \right)$

$\endgroup$
  • $\begingroup$ I'd like to ask you where you get built-in functions like Control`PCS`SmithForm that are not shown in the help documents $\endgroup$ – Please Correct GrammarMistakes Jan 21 at 3:04
  • 4
    $\begingroup$ @Gowiththewind, I used ??*`*SmithForm* $\endgroup$ – kglr Jan 21 at 3:12
  • $\begingroup$ @Gowiththewind actually, you'd better use \` to type ` ,or the effect will not be so good. $\endgroup$ – wuyudi Jan 21 at 3:43
  • $\begingroup$ @wuyudi Okay,thank you very much for your suggestion. $\endgroup$ – Please Correct GrammarMistakes Jan 21 at 6:04
7
$\begingroup$

The Wolfram Function Repository has a (recently added) function for this.

amat = {{1 - lam, 2 lam - 1, lam}, {lam, lam^2, -lam}, {1 + lam^2, 
    lam^3 + lam - 1, -lam^2}};

ResourceFunction["PolynomialSmithDecomposition"][amat]

(* Out[3320]= {{{0, -1 - lam - lam^2, 1 + lam}, {0, 
   1 + lam^2, -lam}, {1, -lam^2 - lam^3, -1 + lam + lam^2}}, {{1, 0, 
   0}, {0, lam, 0}, {0, 0, lam + lam^2}}, {{1, 1, 1 - lam}, {0, 1, 
   1}, {0, 0, 1}}} *)

It returns three matrices in the form {left multiplier, SNF, right multiplier}

--- edit ---

Since it came up in other responses, I'll say a bit about the relationship between this WFR function and the Control`PCS`​ functions. They predate the WFR function (obviously). There is a PolynomialSmithDecomposition as well as SmithForm. I believe the latter simply returns the middle matrix from the former (so no computation is saved).

The WFR function is a rewritten variant, and I believe in some cases it will be more efficient. I've not had a chance yet to pass this on to the developer handling the control functionality. Also there remains a question of which version is better to use in the case of polynomials with approximate coefficients. That will require some experimentation. Also it could be the case that the new one is sometimes slower, ergo, more experimentation needed. So this remains a work in progress.

--- end edit ---

$\endgroup$
  • 1
    $\begingroup$ Thank you very much for the function you added in the FunctionRepository. $\endgroup$ – Please Correct GrammarMistakes Jan 22 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.