# Matrix Product NL expression

**URL:** <https://discourse.julialang.org/t/matrix-product-nl-expression/93345>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [January 22, 2023, 1:36am UTC](https://discourse.julialang.org/t/matrix-product-nl-expression/93345 "2023-01-22T01:36:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apateonas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/apateonas/32/38650_2.png) [@apateonas](https://discourse.julialang.org/u/apateonas)\
**Post date:** [January 22, 2023, 1:36am UTC](https://discourse.julialang.org/t/matrix-product-nl-expression/93345/1 "2023-01-22T01:36:11Z")

</div>

Hello, I am new to JuMP. I want to create the following non-linear expression:

```julia
KdagK = @NLexpression(model, K' * K)

```

Here, K is a matrix of complex variables. What is the best way to do this?

Thank you!

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [January 22, 2023, 9:35am UTC](https://discourse.julialang.org/t/matrix-product-nl-expression/93345/2 "2023-01-22T09:35:32Z")

</div>

See [Nonlinear Modeling · JuMP](https://jump.dev/JuMP.jl/stable/manual/nlp/#Scalar-operations-only)

You can try `@expression` instead of `@NLexpression`, but it supports only linear and quadratic terms. If you have higher order expressions, you currently need to write the scalar expansion.
