I am given the following expression where $f \in L^2(\mathbb{R}^2, \mathbb{R}^{2 \times 2})$


$$\int\_{\mathbb{R}} \int\_{\mathbb{R}} \langle g(x), f(x,y) h(y)\rangle dx dy.$$


The functions $g$ and $h$ are in $L^2(\mathbb{R},\mathbb{R}^2).$


**Question:** Is it then true that 


$$\sup\_{\left\lVert g \right\rVert=\left\lVert h \right\rVert=1}\int\_{\mathbb{R}} \int\_{\mathbb{R}} \langle g(x), f(x,y) h(y)\rangle dx dy = \left\lVert f \right\rVert\_{L^2(\mathbb{R}, \mathbb{R}^{2 \times 2})}^2?$$


Here $L^2(\mathbb{R}, \mathbb{R}^{2 \times 2})$ is the $L^2$ norm of the operator norm of $f.$


**Background:**
I would like to explain the question by saying that it is true that 


$$\langle v, Aw\rangle$$ 
maximized over all $v,w$ of norm $1$ for a matrix $A$ gives the operator norm of $A$ and calculating 


$$\int\_{\mathbb{R}} \int\_{\mathbb{R}} \overline{h(x,y)} f(x,y) dx dy.$$


for $f \in L^2(\mathbb{R}^2; \mathbb{R})$ maximized over all $h \in L^2(\mathbb{R}^2; \mathbb{R})$ of norm one yields the $L^2$ norm of $f$.


But is this mixed result above true as well?



Recover norm from integral
The inequality $\leq$ is obvious. 


The reverse doesn't have to be true. 


Let $f(x,y) = \mathrm{Id} \cdot \chi(x,y)$ where $\chi(x,y)$ is the scalar function that equals $1$ on the squares
$$ (x,y) \in [0,1] \times [0,1] \cup [-1,0]\times [-1,0] $$
and zero otherwise.


So 
$$ \iint\_{\mathbb{R}\times\mathbb{R}} \langle g(x), f(x,y) h(y) \rangle ~\mathrm{d}x ~\mathrm{d}y = \int\_0^1 \int\_0^1 \langle g(x), h(y) \rangle ~\mathrm{d}x ~\mathrm{d}y \\ + \int\_{-1}^0 \int\_{-1}^0 \langle g(x), h(y) \rangle ~\mathrm{d}x ~\mathrm{d}y$$
Using Holder's inequality we can bound the right hand side by 
$$ \leq G\_+ H\_+ + G\_- H\_- $$
where
$$ G\_+ = \|g\|\_{L^2([0,1])}, H\_+ = \|h\|\_{L^2([0,1])}$$
$$ G\_- = \|g\|\_{L^2([-1,0])}, H\_- = \|h\|\_{L^2([-1,0])} $$
By assumption $G\_+^2 + G\_-^2 \leq 1$ and also $H\_+^2 + H\_-^2 \leq 1$. So by Cauchy's inequality we have that 
$$ G\_+ H\_+ + G\_- H\_- \leq 1$$


On the other hand, the operator norm of $f(x,y)$, as a function of $x,y$, is simply the function $\chi(x,y)$. This function has $L^2(\mathbb{R}^2)$ norm equal to $\sqrt{2} > 1$. 




---


Remark: the problem is not so much with "integration" per se. As you can guess from the example given, the problem also manifests in the finite dimensional case, where $g$ and $h$ are functions $\{0,1\} \to \mathbb{R}^2$ and $f(x,y)$ is a function from $\{(0,0), (0,1), (1,0), (1,1)\} \to \mathbb{R}^{2\times 2}$, and the integral is replaced by a sum. 


Thinking about this more, you will see that essentially we are taking a tensor product, and then you see that the problem is precisely that "not every element in $V\otimes W$ can be written as the tensor product of elements $v\otimes w$. (It can be written as a linear combination of such elements.)


