Difference between revisions of "Factors Command"
From GeoGebra Manual
(→CAS Syntax: fixed bad math rendering - fixed first example with the new output) |
m |
||
Line 2: | Line 2: | ||
{{command|cas=true|function}} | {{command|cas=true|function}} | ||
;Factors[ <Polynomial> ] | ;Factors[ <Polynomial> ] | ||
− | :Gives a list of lists of the type ''{factor, exponent}'' such that the product of all these factors raised to the power of the corresponding exponents equals the given polynomial. The factors are sorted by degree in | + | :Gives a list of lists of the type ''{factor, exponent}'' such that the product of all these factors raised to the power of the corresponding exponents equals the given polynomial. The factors are sorted by degree in ascending order. |
− | :{{example| 1=<div><code><nowiki>Factors[x^8 - 1]</nowiki></code> yields ''{{x | + | :{{example| 1=<div><code><nowiki>Factors[x^8 - 1]</nowiki></code> yields ''{{x - 1, 1}, {x + 1, 1}, {x^2 + 1, 1}, {x^4 + 1, 1}}''.</div>}} |
:{{note| 1=Not all of the factors are irreducible over the reals.}} | :{{note| 1=Not all of the factors are irreducible over the reals.}} | ||
Revision as of 11:29, 23 July 2015
- Factors[ <Polynomial> ]
- Gives a list of lists of the type {factor, exponent} such that the product of all these factors raised to the power of the corresponding exponents equals the given polynomial. The factors are sorted by degree in ascending order.
- Example:
Factors[x^8 - 1]
yields {{x - 1, 1}, {x + 1, 1}, {x^2 + 1, 1}, {x^4 + 1, 1}}.
- Note: Not all of the factors are irreducible over the reals.
- Factors[ <Number> ]
- Gives a list of lists of the type {prime, exponent} such that the product of all these primes raised to the power of the corresponding exponents equals the given number. The primes are sorted in ascending order.
- Example:
Factors[1024]
yields {{2, 10}}, since 1024 = 2^{10}.Factors[42]
yields {{2, 1}, {3, 1}, {7, 1}}, since 42 = 2^1・3^1・7^1.
Note: See also PrimeFactors Command and Factor Command.
CAS Syntax
- Factors[ <Polynomial> ]
- Yields a matrix of the type (factor, exponent) such that the product of all these factors raised to the power of the corresponding exponents equals the given polynomial. The factors are sorted by degree in descending order.
- Example:
Factors[x^8 - 1]
yields \left( \begin{array}{} x - 1 & 1 \\ x +1 & 1 \\x^2 + 1& 1 \\x^4 + 1& 1 \\ \end{array} \right)
- Note: Not all of the factors are irreducible over the reals.
- Factors[ <Number> ]
- Yields a matrix of the type {prime, exponent} such that the product of all these primes raised to the power of the corresponding exponents equals the given number. The primes are sorted in ascending order.
- Example:
Factors[1024]
yields \left( \begin{array}{} 2 & 10 \\ \end{array} \right) , since 1024 = 2^{10}.Factors[42]
yields \left( \begin{array}{} 2 & 1 \\ 3 & 1 \\7 & 1 \\ \end{array} \right) , since 42 = 2^1 · 3^1 · 7^1.
Note: See also PrimeFactors Command and Factor Command.