Difference between revisions of "Factors Command"

From GeoGebra Manual
Jump to: navigation, search
Line 2: Line 2:
 
{{command|function}}
 
{{command|function}}
 
;Factors[ <Polynomial> ]:Returns list of lists ''{factor,exponent}'' such that product of all these factors raised to corresponding exponents equals the given polynomial.  
 
;Factors[ <Polynomial> ]:Returns list of lists ''{factor,exponent}'' such that product of all these factors raised to corresponding exponents equals the given polynomial.  
{{Note|Not all of the factors are irreducible over the reals.}}
+
:{{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>}}
{{Example| 1=<code>Factors[x^8-1]</code> returns ''{{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> ]:Returns list of lists ''{prime,exponent}'' such that product of all these primes raised to corresponding exponents equals the given number. Primes are sorted in ascending order.
 
;Factors[ <Number> ]:Returns list of lists ''{prime,exponent}'' such that product of all these primes raised to corresponding exponents equals the given number. Primes are sorted in ascending order.
{{Example|1=<div>
+
:{{example|1=<div>
* <code>Factors[1024]</code> returns ''<nowiki>{{2,10}}</nowiki>'', because ''1024=2<sup>10</sup>''.
+
:* <code>Factors[1024]</code> returns ''<nowiki>{{2,10}}</nowiki>'', because ''1024=2<sup>10</sup>''.
* <code>Factors[42]</code> returns ''{{2,1},{3,1},{7,1}}'', because ''42=2<sup>1</sup>3<sup>1</sup>7<sup>1</sup>''.</div>}}
+
:* <code>Factors[42]</code> returns ''{{2,1},{3,1},{7,1}}'', because ''42=2<sup>1</sup>3<sup>1</sup>7<sup>1</sup>''.</div>}}
{{Note|See also [[PrimeFactors Command]] and [[Factor Command]].}}
+
{{note|See also [[PrimeFactors Command]] and [[Factor Command]].}}

Revision as of 12:07, 23 August 2011



Factors[ <Polynomial> ]
Returns list of lists {factor,exponent} such that product of all these factors raised to corresponding exponents equals the given polynomial.
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> ]
Returns list of lists {prime,exponent} such that product of all these primes raised to corresponding exponents equals the given number. Primes are sorted in ascending order.
Example:
  • Factors[1024] returns {{2,10}}, because 1024=210.
  • Factors[42] returns {{2,1},{3,1},{7,1}}, because 42=213171.
© 2024 International GeoGebra Institute