Re: Determining the root of the characteristic equation

*To*: mathgroup at smc.vnet.net*Subject*: [mg113470] Re: Determining the root of the characteristic equation*From*: Christofer Bogaso <bogaso.christofer at gmail.com>*Date*: Sat, 30 Oct 2010 04:36:52 -0400 (EDT)

Thanks Daniel, as you said, using NSolve[] function I got the roots of the characteristic equation. This is great!!! However my job is not over here as I need to calculate the absolute value (i.e. modulus) of all roots. I have tried with *Abs[NSolve....* function. However I could not get the numbers at all. Would you please guide me what is the correct way to do that? Thanks, On Fri, Oct 29, 2010 at 9:09 PM, Daniel Lichtblau <danl at wolfram.com> wrote: > Christofer Bogaso wrote: > >> Hello all, >> >> I am a new user of Mathematica and would appreciate if somebody help >> me with some hints how can I use Mathematica to solve a typical >> problem. >> >> Suppose I have a matrix polynomial for "z" (which is a scalar) like: >> >> Determinant of (Identity_matrix[5] - A1*z - A2*(z^2)) = 0 >> >> Here A1 and A2 are 2 separate given square matrices of length 5. >> >> I have faced this problem while solving the characteristic polynomial >> of a multivariate time series model. I am aware of the capability of >> Mathematica for it's symbolic computation. >> >> It would really be helpful if somebody helps me how to do that using >> Mathematica. >> >> Thanks and regards, >> > > Just solve for det(matrix) = 0. > > Example: > n = 5; > a1 = RandomInteger[{-10,10}, {n,n}]; > a2 = RandomInteger[{-10,10}, {n,n}]; > mat = IdentityMatrix[n] - a1*z - a2*z^2; > > Here we solve for that determinant being zero. > > Solve[Det[mat]==0, z] > > Could instead use NSolve if you just want numeric solutions. > > Daniel Lichtblau > Wolfram Research >