Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-01-31 11:31:32

leibgrangian
Guest

quadratics and matrices

Hi, does anyone know a way to solve a quadratic eqn, like

using matrices?

can someone show me a solution to this using matrices please? thanks!

#2 2011-01-31 12:33:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi leibgrangian;

I think you are a little confused on when you use what and where.

That is best solved by factoring, completing the square or the quadratic formula.

In numerical work if that were a higher degree equation you could turn it into a a matrix that has the same eigenvalues as the root of the equation. This would be tremendous overkill in this situation.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2011-01-31 18:57:33

leibgrangian
Guest

Re: quadratics and matrices

hi, can you show me an example where you might do that?

#4 2011-01-31 20:09:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

I do not suppose anyone else knows this. The last time I saw a mention of the companion matrix was in Numerical Methods for Digital Computers by Ralston and Wilf 1957.

Herbert S. Wilf wrote:

Any computing installation that has a program for finding all the eigenvalues of a real matrix ( no mean task ) has no need for another routine to solve algebraic equations, at the expense of some inefficiency in computing time.

The matrix is called the companion matrix. For your problem.

You will sometimes see it in transposed form.

The eigenvalues of that matrix are the roots of your polynomial.

Now do not misunderstand me, no one would use this method on a quadratic, especially that one. But if the polynomial was of higher degree and you had a working QR algorithm, you might use it as Herbert suggests.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2011-02-01 04:08:00

leibgrangian
Guest

Re: quadratics and matrices

thanks for your reply.

how did you find the companion matrix for my equation?

also, could you show me an example for how you would use your method for a polynomial of higher degree?

#6 2011-02-01 04:08:51

leibgrangian
Guest

Re: quadratics and matrices

also, of what degree power is this used for, generally? can it be used for cubic equations? (where one would have to use the cubic formula, so maybe using this method is quicker?)

#7 2011-02-01 07:29:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi;

Only if you already had eigenvalue software working. That is pretty difficult in itself. I personally would never use that method. There are iterative methods that can be used for cubics and beyond.

But for book problems like the one you posted, book methods are best. After all the problems were formulated to illustrate the methods.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2011-02-02 04:08:28

leibgrangian
Guest

Re: quadratics and matrices

for the matrix,

when i want to find the eigenvalue of this matrix, what is the operation i must perform? can you calculate the eigenvalue given just a matrix, like the one above?

the eigenvalue of this matrix is -1, right? because if the companion matrix is

then if we let

and

then to turn this into a polynomial we have to do

(where |X| is the determinant of X)

I did this for the companion matrix above and i did get original polynomial,

.

however what i want to know first is, how from, just given the polynomial, you found the companion matrix? i am guessing you sort of worked backwards?

also, you said finding the eigenvalues of

required computer software, is there a way to do it on paper, if i did not have any eigenvalue software such as mathematica?

basically, can you show an example where:

you take an equation like x^4 + 2x^3 - x^2 - x - 1 = 0,

turn it into a companion matrix,

then compute by hand the eigenvalues of that matrix?

assuming i am very quick with mental arithmetic how long would that take, and could you show me the steps in this process? thanks!

#9 2011-02-02 04:13:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi;

then compute by hand the eigenvalues of that matrix?

Generally that would be harder than getting the roots of a 4 th degree poly by hand. It would be tedious to the extreme. I can show you how to turn it into a companion matrix, that is just a formula. But getting the eigenvalues is a job for a computer using Jacobi or the QR algorithm.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2011-02-02 04:15:00

leibgrangian
Guest

Re: quadratics and matrices

hi again,

i read that for any matrix, the eigenvalues add up to the trace of the matrix, and the product of the eigenvalues is the determinant. is this true?

so for my example,

if the eigenvalues are a and b,

a + b = -2
ab = 1

so a and b must be -1 and -1 (so the single eigenvalue is -1)?

also, i know how to calculate the determinant for 2x2 and 3x3 matrices, can't remember 4x4 right now, but to find the Trace of any matrix, do you just add up the values along the diagonal?

#11 2011-02-02 04:16:10

leibgrangian
Guest

Re: quadratics and matrices

hi, sorry i didnt see your latest post, thanks for your reply.

could you show me how you got the companion matrix for x^2 + 2x + 1? i can't find a formula anywhere, could you please tell me it? thanks!

#12 2011-02-02 04:17:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Yes just add up the main diagonal elements. But a 4 x 4 determinant is very tedious by hand. Generally the problem of getting the roots of anything higher than a quadratic is a nightmare.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#13 2011-02-02 04:20:37

leibgrangian
Guest

Re: quadratics and matrices

hi, thanks for your reply.

to get the trace of any matrix with any number of row and columns (for example, 2x3, or 4x7) do i just add up along the diagonal from top left and keep following the diagonal until i can't go any further?

#14 2011-02-02 04:22:10

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Yes, I believe that is correct.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2011-02-02 04:23:06

leibgrangian
Guest

Re: quadratics and matrices

hi, thanks for your reply again.

could you show me how you got the companion matrix for x^2 + 2x + 1? and, if possible, could you show me the formula you used, if it is too much to ask? thanks!

#16 2011-02-02 04:23:34

leibgrangian
Guest

Re: quadratics and matrices

sorry, i meant, "if it's not too much to ask". darn my stupid english

#17 2011-02-02 04:36:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi;

Do not forget sometimes they transpose it and call that the companion matrix. Still has the same eigenvalues though.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2011-02-02 08:46:20

leibgrangian
Guest

Re: quadratics and matrices

hi, thanks for the reply!

thank you for the formula..but i have a question,

i noticed that, the matrix does not include the co-efficient of t^n. does this mean, then, that you cannot use this method if there is a co-efficient greater than 1 for t^n, such as 4t^4 (where 4 is the highest power in the polynomial)? or must something different be done?

#19 2011-02-02 08:48:25

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi leibgrangian;

You are correct it must be a monic polynomial.That means the highest power has a coefficient of 1. But you can turn any poly into a monic one.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2011-02-02 08:50:24

leibgrangian
Guest

Re: quadratics and matrices

hi, thanks for reply, again..

really? ok, how do i turn, for example, 2x^2 + 3x + 5 into a monic polynomial?

thanks

#21 2011-02-02 08:53:05

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Divide all the coefficients by 2. You can do this because it does not change the roots.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#22 2011-02-02 09:00:28

leibgrangian
Guest

Re: quadratics and matrices

hi,

really?

i always thought that if you had an equation.. like 2x^2 + 3x + 5 = 0...

that if you could just divide all by 2 and it would still be a legitimate move, then you could do something like divide both sides by 2x^2 + 3x + 5 to get 1 = 0...so that was my reason for thinking you couldnt divide the whole LHS by 2...

so it is perfectly ok for it to become x^2 + 1.5x + 2.5 = 0?

#23 2011-02-02 09:06:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Yes, check it for yourself. The roots remain the same. By the way you make it a point to never divide by a variable when solving an equation. Only unless it is stated that the variable cannot be zero.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#24 2011-02-02 09:16:07

leibgrangian
Guest

Re: quadratics and matrices

hi,

that makes perfect sense. thanks!

#25 2011-02-02 18:54:01

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: quadratics and matrices

Hi leibgrangian;

that makes perfect sense.

I knew a guy, used to solve his quadratics like this:

He would divide by x:

Wow, turned a quadratic into a linear equation. x = - 2. Then he would look around for the other root by trial and error. Needless to say this boob did not amount to much.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB