Difference between revisions of "Factors Command"

From GeoGebra Manual
Jump to: navigation, search
Line 4: Line 4:
 
:Returns list of lists ''{factor,exponent}'' such that product of all these factors raised to corresponding exponents equals the given polynomial.  
 
:Returns list of lists ''{factor,exponent}'' such that product of all these factors raised to corresponding exponents equals the given polynomial.  
 
:{{example| 1=<div><code><nowiki>Factors[x^8 - 1]</nowiki></code> yields ''{{x^4 + 1, 1},  {x^2 + 1, 1}, {x + 1, 1}, {x - 1, 1}}''.</div>}}
 
:{{example| 1=<div><code><nowiki>Factors[x^8 - 1]</nowiki></code> yields ''{{x^4 + 1, 1},  {x^2 + 1, 1}, {x + 1, 1}, {x - 1, 1}}''.</div>}}
:{{note|Not all of the factors are irreducible over the reals.}}
+
:{{note| 1=Not all of the factors are irreducible over the reals.}}
 
;Factors[ <Number> ]
 
;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.
 
: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> yields ''<nowiki>{{2, 10}}</nowiki>'', because ''1024 = 2<sup>10</sup>''.
+
:* <code><nowiki>Factors[1024]</nowiki></code> yields ''<nowiki>{{2, 10}}</nowiki>'', because ''1024 = 2<sup>10</sup>''.
:* <code>Factors[42]</code> yields ''{{2, 1}, {3, 1}, {7, 1}}'', because ''42 = 2<sup>1</sup> 3<sup>1</sup> 7<sup>1</sup>''.</div>}}
+
:* <code><nowiki>Factors[42]</nowiki></code> yields ''{{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| 1=See also [[PrimeFactors Command]] and [[Factor Command]].}}
 
==CAS Syntax==
 
==CAS Syntax==
 
;Factors[ <Polynomial> ]
 
;Factors[ <Polynomial> ]
Line 20: Line 20:
 
x-1&1
 
x-1&1
 
\end{pmatrix}</math>.</div>}}
 
\end{pmatrix}</math>.</div>}}
:{{note|Not all of the factors are irreducible over the reals.}}
+
:{{note| 1=Not all of the factors are irreducible over the reals.}}
 
;Factors[ <Number> ]
 
;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.
 
: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> yields ''<nowiki>{{2, 10}}</nowiki>'', displayed as <math>\begin{pmatrix}
+
:* <code><nowiki>Factors[1024]</nowiki></code> yields ''<nowiki>{{2, 10}}</nowiki>'', displayed as <math>\begin{pmatrix}
 
2&10
 
2&10
 
\end{pmatrix}</math>, because ''1024 = 2<sup>10</sup>''.
 
\end{pmatrix}</math>, because ''1024 = 2<sup>10</sup>''.
:* <code>Factors[42]</code> yields ''{{2, 1}, {3, 1}, {7, 1}}'', displayed as <math>\begin{pmatrix}
+
:* <code><nowiki>Factors[42]</nowiki></code> yields ''{{2, 1}, {3, 1}, {7, 1}}'', displayed as <math>\begin{pmatrix}
 
2&1\\
 
2&1\\
 
3&1\\
 
3&1\\

Revision as of 14:08, 9 September 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^4 + 1, 1}, {x^2 + 1, 1}, {x + 1, 1}, {x - 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] yields {{2, 10}}, because 1024 = 210.
  • Factors[42] yields {{2, 1}, {3, 1}, {7, 1}}, because 42 = 21 31 71.

CAS Syntax

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^4 + 1, 1}, {x^2 + 1, 1}, {x + 1, 1}, {x - 1, 1}}, displayed as \begin{pmatrix} x^4+1&1\\ x^2+1&1\\ x+1&1\\ x-1&1

\end{pmatrix}
.
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] yields {{2, 10}}, displayed as \begin{pmatrix} 2&10 \end{pmatrix}, because 1024 = 210.

    • Factors[42] yields {{2, 1}, {3, 1}, {7, 1}}, displayed as \begin{pmatrix} 2&1\\ 3&1\\ 7&1

      \end{pmatrix}
      , because 42 = 21 31 71.
© 2024 International GeoGebra Institute