Recover norm from integral 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?
 A: 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.)
