2
$\begingroup$

The matrices A, B are companion matrices of the form $A = \left[C_{1}\middle|\frac{I}{0\dots0}\right], B= \left[C_{2}\middle|\frac{I}{0\dots0}\right]$ enter image description here

I was thinking a) if we can verify equation (2), (3) using Mathematica? b) Implementing a Schur complement using Mathematica c) use Mathematica to consider other cases of $n$ (when $n$ is not a multiple of $3$).

enter image description here

$\endgroup$
16
  • $\begingroup$ You'd be happy with verifying for finitely many n (say up to $999$) or you want to verify this keeping n symbolic throughout? Also, what have you tried so far, and please include your Mathematica code. $\endgroup$
    – user293787
    Aug 13 at 8:18
  • $\begingroup$ Thanks, I just want to see the patterns I get from Mathematica match (2), (3) as per analytics for large $n$ (yes 999 sounds good). I have not used Mathematica much but have known that it is nice for symbolics..I was searching for Schur complement in Mathematica but could not find much hits.. $\endgroup$
    – BAYMAX
    Aug 13 at 8:23
  • 2
    $\begingroup$ There seems to be something wrong with alphas and betas. E.g. for n==6 the highest index,, alphas and betas contain indices higher than n $\endgroup$ Aug 13 at 8:24
  • $\begingroup$ Oh ok, I think using Mathematica, a correct generalized expression could be derived by looking into the patterns as different values of $n$ are considered? $\endgroup$
    – BAYMAX
    Aug 13 at 8:27
  • $\begingroup$ Please address @DanielHuber's observation. Concerning Schur complement, it is not difficult to program this oneself, for example schurDet[mat_,ind_] := With[{n=Length[mat]},With[{rest=Complement[Range[1,n],ind]}, With[{A=mat[[ind,ind]], B=mat[[ind,rest]], C=mat[[rest,ind]], D=mat[[rest,rest]]}, Det[A]*Det[D-C.Inverse[A].B]]]]; schurDetFirstLast[mat_]:=schurDet[mat,{1,Length[mat]}];. For example, RandomReal[{-1,1},{9,9}]//{Det[#],schurDetFirstLast[#]}&. $\endgroup$
    – user293787
    Aug 13 at 8:38

2 Answers 2

4
$\begingroup$

For n a multiple of 3, this is right, but for other n, it is wrong:

n = 6;
aa = Table[
   Which[j == 1, Subscript[a, i], j == i + 1, 1, True, 0], {i,n}, {j,n}];
bb = Table[
   Which[j == 1, Subscript[b, i], j == i + 1, 1, True, 0], {i,n}, {j,n}];
al[i_] = - KroneckerDelta[3, i] + Sum[Subscript[a, 3 k + i], {k, 0, n/3 - 1}];
be[i_] = - KroneckerDelta[3, i] + Sum[Subscript[b, 3 k + i], {k, 0, n/3 - 1}];
Det[aa . bb + aa + IdentityMatrix[n]] ==
  Det[{{al[1] - al[3], be[1] - be[2]}, {al[2] - al[3], be[1] - be[3]}}] ==
  Det[{{al[1], 1, be[2]}, {al[2], 1, be[3]}, {al[3], 1, be[1]}}] // Expand

(* True *)

But for e.g. n==5 this returns False. This seems understandable as 3 appears explicit in the equations.

$\endgroup$
1
  • $\begingroup$ Yes actually I want to see what other changes in the equations so that it works for other $n$.. so that all $n \in \Bbb{N}$ can be covered? and I was thinking to see a Schur implementation in code format which i dont know $\endgroup$
    – BAYMAX
    Aug 14 at 7:59
4
$\begingroup$

Here is a verification for n (even) up to 100. It does not verify for all n.

enter image description here

I verifies for values that are 3*n. So 6,12,18,24,30,36,42,...

code

ClearAll[n, a, b];
makeMatrix[(n_Integer)?Positive, v_Symbol] := Module[{t},
   t = DiagonalMatrix[Table[1, {n - 1}]];
   t = Join[t, {Table[0, {n - 1}]}];
   t = Join[List /@ Array[v, n], t, 2]
   ];
alpha[(i_Integer)?Positive, (n_Integer)?Positive] := -KroneckerDelta[3, i] + 
   Sum[a[3*k + i], {k, 0, n/3 - 1}];
beta[(i_Integer)?Positive, (n_Integer)?Positive] := -KroneckerDelta[3, i] + 
   Sum[b[3*k + i], {k, 0, n/3 - 1}];

Manipulate[Module[{A, B, mat1, mat2},
  A = makeMatrix[n, a];
  B = makeMatrix[n, b];
  mat1 = {{alpha[1, n] - alpha[3, n], 
     beta[1, n] - beta[2, n]}, {alpha[2, n] - alpha[3, n], 
     beta[1, n] - beta[3, n]}};
  mat2 = {{alpha[1, n], 1, beta[2, n]}, {alpha[2, n], 1, 
     beta[3, n]}, {alpha[3, n], 1, beta[1, n]}};

  If[Simplify[Det[A . B + A + IdentityMatrix[n]] === Det[mat1]], 
   Row[{"Verified for n=", n}], Row[{"Not Verified for n=", n}]]
  ]
 ,
 {{n, 6, "n"}, 2, 100, 2, Appearance -> "Labeled"},
 TrackedSymbols :> {n}
 ]
$\endgroup$

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.