Factor

Factors a number or an expression.

Syntax

factor(Number)
factor(Expression)
factor(Expression, Variable)
factor(List)
factor(List, Variable)
factor(Matrix)
factor(Matrix, Variable)

Examples

Factoring expressions

The factor command rewrites expressions as a product of terms.

Simplifying logarithmic expressions

Many logarithmic expressions can be simplified simply by pressing Enter. If the expressions include variables, it is often necessary to define a domain to allow simplification. You can also try using expand and factor. These tools can be helpful, but may sometimes lead to unwanted forms, such as factorizations of base numbers.

Factorization and primality

The factor command can be used to write an integer in factored form. The isPrime command can be used to check whether a number is prime.