# Complex roots

**URL:** <https://discourse.mcneel.com/t/complex-roots/153489>\
**Category:** Grasshopper\
**Tags:** windows, math, expressions\
**Created:** [January 18, 2023, 12:01pm UTC](https://discourse.mcneel.com/t/complex-roots/153489 "2023-01-18T12:01:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![submillimetre](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/submillimetre/32/480628_2.png) [@submillimetre](https://discourse.mcneel.com/u/submillimetre)\
**Post date:** [January 18, 2023, 12:01pm UTC](https://discourse.mcneel.com/t/complex-roots/153489/1 "2023-01-18T12:01:17Z")

</div>

![complex_roots](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/2/e/92efab0ae7956f864a690e11d8fb3c881b8667b6.png)

Hi  
Is there a quick and easy way to get the complex roots of an equation?  
Thanks

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [January 18, 2023, 12:19pm UTC](https://discourse.mcneel.com/t/complex-roots/153489/2 "2023-01-18T12:19:21Z")

</div>

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/d/2/cd2004688c159fecb5c197e5aad286b06c92e5e6.png)  
If you convert a real negative number to a complex number with 0 for the imaginary part, it will give you the complex root with the expression component.  
If you use the Sqrt component instead of Expression, it looks like it works on negative numbers also without this conversion.

---

<div class="post-metadata">

**Author:** ![akilli](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/akilli/32/514967_2.png) [@akilli](https://discourse.mcneel.com/u/akilli)\
**Post date:** [January 18, 2023, 12:29pm UTC](https://discourse.mcneel.com/t/complex-roots/153489/3 "2023-01-18T12:29:22Z")

</div>

The IAC plugin contains a Polynomial Solver component that gives real and complex roots.

 ![roots](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/a/b/3ab8b1e51c7558d6b77e894e1c76c84cb2fb46b4.png)

> **[IAC](https://www.food4rhino.com/en/app/iac)**
>
> Includes general purpose components in math and geometry and fulfills missing necessities in Grasshopper.

---

<div class="post-metadata">

**Author:** ![submillimetre](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/submillimetre/32/480628_2.png) [@submillimetre](https://discourse.mcneel.com/u/submillimetre)\
**Post date:** [January 18, 2023, 12:44pm UTC](https://discourse.mcneel.com/t/complex-roots/153489/4 "2023-01-18T12:44:32Z")

</div>

@DanielPiker @akilli  
Thank you both!
