# Computer Algebra "factor" function

**URL:** <https://discourse.julialang.org/t/computer-algebra-factor-function/102837>\
**Category:** General Usage\
**Tags:** question, symbolics, factorization\
**Created:** [August 15, 2023, 5:50pm UTC](https://discourse.julialang.org/t/computer-algebra-factor-function/102837 "2023-08-15T17:50:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![shikil](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@shikil](https://discourse.julialang.org/u/shikil)\
**Post date:** [August 16, 2023, 1:25am UTC](https://discourse.julialang.org/t/computer-algebra-factor-function/102837/2 "2023-08-16T01:25:12Z")

</div>

> [@maxasauruswall](#):
>
> `p = 55*x^2*y - 15*x*y^2 + 44*x*y - 12*y^2`

Package `Hecke` has factor function for polynomial.

```julia
using Hecke

R,(x,y)=polynomial_ring(QQ, [:x, :y])
# (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])

p = 55*x^2*y - 15*x*y^2 + 44*x*y - 12*y^2
# 55*x^2*y - 15*x*y^2 + 44*x*y - 12*y^2

factor(p)
# 1 * y * (11*x - 3*y) * (5*x + 4)

q=77x^2*y-21x*y^2-22x^2+6x*y
# 77*x^2*y - 22*x^2 - 21*x*y^2 + 6*x*y

gcd(p, q)
# x - 3//11*y

```

---

_[View the full topic](https://discourse.julialang.org/t/computer-algebra-factor-function/102837)._
