# Least Squares Minimization of operator norm

**URL:** https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723
**Category:** Optimization (Mathematical)
**Created:** [January 21, 2021, 1:29pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723 "2021-01-21T13:29:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cheng\_chen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cheng_chen/32/20899_2.png) [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)
#### Post date: [January 21, 2021, 1:29pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723/1 "2021-01-21T13:29:57Z")

</div>

Here is a minimal example of my problem: I want to find a minimizer x that minimizes the objective function :

```julia
opnorm(A*x-b,2)^2

```

I tried Convex.jl, but it doesn’t work for the operator norm.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [January 21, 2021, 1:33pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723/2 "2021-01-21T13:33:29Z")

</div>

> [@cheng\_chen](#):
>
> `opnorm(A*x-b,2)^2`

If `x` and `b` are 1d arrays, this is not defined in Julia. If they are 1-column matrices, this is equivalent to the Euclidean norm. What are the dimensions here?

---

<div class="post-metadata">

### Author: ![cheng\_chen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cheng_chen/32/20899_2.png) [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)
#### Post date: [January 21, 2021, 3:12pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723/3 "2021-01-21T15:12:39Z")

</div>

Thank you for your reply!  
Let’s say A is d by n, x is n-dimensional and b is d-dimensional, which means A\*x-b is d-dimensional.

---

<div class="post-metadata">

### Author: ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)
#### Post date: [January 21, 2021, 3:24pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723/4 "2021-01-21T15:24:56Z")

</div>

`opnorm` is for operators (matrices), which I think is what @stevengj is getting at here. Do you mean `norm` instead?
