Difference between revisions of "Factors Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(24 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|function}}
{{command|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 ascending order.
:Returns list of lists ''{factor,exponent}'' such that product of all these factors raised to corresponding exponents equals the given polynomial.  
+
:{{example| 1=<code><nowiki>Factors(x^8 - 1)</nowiki></code> yields ''{{x - 1, 1}, {x + 1, 1}, {x^2 + 1, 1}, {x^4 + 1, 1}}''.}}
:{{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|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.
+
:Gives matrix of the type <math>\left( \begin{array}{} prime_1 & exponent_1 \\ prime_2 & exponent_2 \\prime_3 & exponent_3 \\ \end{array}   \right) </math> 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|1=<div>
 
:{{example|1=<div>
:* <code>Factors[1024]</code> returns ''<nowiki>{{2,10}}</nowiki>'', because ''1024 = 2<sup>10</sup>''.
+
:* <code><nowiki>Factors(1024)</nowiki></code> yields ''<nowiki>( 2   10 )</nowiki>'', since <math>1024 = 2^{10}</math>.
:* <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><nowiki>Factors(42)</nowiki></code> yields <math>\left( \begin{array}{} 2 & 1 \\ 3 & 1 \\7 & 1 \\ \end{array}   \right) </math>, since <math>42 = 2^1・3^1・7^1</math>.</div>}}
{{note|See also [[PrimeFactors Command]] and [[Factor Command]].}}
 
==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| 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}}'', displayed as<math>\begin{pmatrix}
 
x-1&1\\
 
x+1&1\\
 
x^4+1&1\\
 
x^4+1&1
 
\end{pmatrix}</math>.</div>}}
 
:{{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|1=<div>
 
:* <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>}}
 
 
{{note|See also [[PrimeFactors Command]] and [[Factor Command]].}}
 
{{note|See also [[PrimeFactors Command]] and [[Factor Command]].}}
 +
<br>
 +
{{note|1=
 +
In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] undefined variables can be used as input and the results are returned as proper matrices.
 +
:{{example| 1=<code><nowiki>Factors(a^8 - 1)</nowiki></code> yields <math>\left( \begin{array}{} a - 1 & 1 \\ a +1 & 1 \\a^2 + 1& 1 \\a^4 + 1& 1 \\ \end{array}  \right)</math>.}}
 +
}}

Latest revision as of 08:17, 9 October 2017


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 matrix of the type \left( \begin{array}{} prime_1 & exponent_1 \\ prime_2 & exponent_2 \\prime_3 & exponent_3 \\ \end{array} \right) 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 \left( \begin{array}{} 2 & 1 \\ 3 & 1 \\7 & 1 \\ \end{array} \right) , since 42 = 2^1・3^1・7^1.


Note: In the Menu view cas.svg CAS View undefined variables can be used as input and the results are returned as proper matrices.
Example: Factors(a^8 - 1) yields \left( \begin{array}{} a - 1 & 1 \\ a +1 & 1 \\a^2 + 1& 1 \\a^4 + 1& 1 \\ \end{array} \right).
© 2024 International GeoGebra Institute