(*linear 1st order differential equations and eigenvalues*)
mf=MatrixForm;
A=(({{2, 1}, {1, 2}}));
mrank=MatrixRank[A];
{lambdas,vectors}=Eigensystem[A];
P=Transpose[vectors];
invP=Inverse[P];
diag=invP.A.P;
mf@diag;
P.diag.invP//mf;
Eigenvalues[diag]-lambdas;
vars=(Subscript[x, #])[t]&/@Range[mrank];
eqns=Thread[D[vars,t]==A.vars];
vectInitConds=Range[mrank];
initConds=Thread[vars==vectInitConds]/.t->0;
expDiagMat=DiagonalMatrix[Exp[Diagonal[t*diag]]];
expDiagMat//mf;
expMatA=P.expDiagMat.invP;
sol=expMatA.vectInitConds//Simplify
DSolve[Union[eqns,initConds],vars,t]

(*"dukaz" ze rovnice n-teho radu ma stejne koreny jako matice vlastni cisla*)
ClearAll[a];
mrank=5;
origEqn=D[y[t],{t,mrank}]+(∑_(i=0)^(mrank-1))(Subscript[a, i])*D[y[t],{t,i}];
vars=(Subscript[x, #])[t]&/@Range[mrank];
eqns1=(Subscript[x, #-1])'[t]==(Subscript[x, #])[t]&/@Range[2,mrank];
eqnn=(Subscript[x, mrank])'[t]==-(∑_(i=1)^mrank)(Subscript[a, i-1])*(Subscript[x, i])[t];
eqnsTogether=Append[eqns1,eqnn]
{b,m}=CoefficientArrays[eqnsTogether,vars]//Normal
Thread[b==-m.vars]
A=-m;
mf@A
Det[A-λ*IdentityMatrix[mrank]]
origEqn/.{(Derivative[n_][y][t]):>(λ^n),y[t]->1}