Determining the norm of a linear operator Let $k:[a,b]\times [a,b]\to\mathbb{R}$ be a continuous function, and $T:C([a,b])\to C([a,b])$ be a linear operator defined by
$$(Tf)(x):=\int_a^b k(x,y)f(y)\,dy.$$
I want to show that $$\|T\|=\max_{a\leq x\leq b}\int_a^b |k(x,y)|\,dy.$$
 It's easy to show  $\|T\|\leq\max_{a\leq x\leq b}\int_a^b |k(x,y)|\,dy$,
but how to show that it can attain the maximum? 
 A: Since $k$ is continuous on the compact set $[a,b]\times [a,b]$, $k$ is  uniformly continuous. Thus for  fixed $\varepsilon>0$, we can find a simple function $h:[a,b]\times [a,b]\to\mathbb{R}$ $$h(x,y)=\sum_{i=1}^n c_i1_{B_i}(x,y)$$ such that $$\sup_{(x,y)\in[a,b]\times[a,b]}|k(x,y)-h(x,y)|\leq \varepsilon,$$ where $B_i=I_i\times J_i\subset [a,b]\times [a,b]$ are boxes (here $I_i,J_i$ are sub-intervals of $[a,b]$, i.e., a set has the form $[c,d],(c,d),[c,d),(c,d)$). Let $x$ be fixed, since the function $h_x:[a,b]\to\mathbb{R}$ defined by $h_x(y)=h(x,y)$ is piecewise constant, we can then choose a  $f\in C([a,b])$ with sup-norm $1$ such that $$\int_a^b h(x,y)f(y)\,dy\geq \int_a^b |h(x,y)|\,dy-\varepsilon.$$ 
Note that  $\sup_{(x,y)\in[a,b]\times [a,b]}|k(x,y)-h(x,y)|\leq\varepsilon$,  we then have
$$|\int_a^b k(x,y)f(y)\,dy-\int_a^b h(x,y)f(y)\,dy|\leq \int_a^b |k(x,y)-h(x,y)||f(y)|\,dy\leq (b-a)\varepsilon,$$
and $$|\int_a^b |k(x,y)|\,dy-\int_a^b |h(x,y)|\,dy|\leq \int_a^b |k(x,y)-h(x,y)|\,dy\leq (b-a)\varepsilon.$$
Combining this inequalities together, we obtain
$$\int_a^b k(x,y)f(y)\,dy\geq \int_a^b |k(x,y)|\,dy-\varepsilon-2(b-a)\varepsilon.$$
Since $\varepsilon$ is arbitrary, the claim follows. 
Remark. How to find a $f\in C([a,b])$ such that 
$$\int_a^b h(x,y)f(y)\,dy\geq \int_a^b |h(x,y)|\,dy-\varepsilon.$$
Since $h_x$ is piecewise contant,  we can write $h_x(y)=\sum_{k=1}^m c_k1_{I_k}(y)$, where $I_k=[a_k,b_k],(a_k,b_k),[a_k,b_k),(a_k,b_k]$ are intervals. By decomposing $I_k$ into sub-intervals, we may assume that $I_k$ are disjoint. By changing the order of $I_k$, we may also assume that $$a_1\leq b_1\leq a_2\leq b_2\leq\cdots\leq a_m\leq b_m.$$
For simpleness, I assume that $I_1=[a_1=a,b_1), I_n=[a_m,b_m=b]$, $I_k=[a_k,b_k)$ and $a_k\neq b_k$ for $1\leq k\leq m$. Now we define a continous function $f$ which is the constant $\text{sgn}{(c_i)}$ on the interval $[a_k+\varepsilon,b_k-\varepsilon]$, is the line segment connected the points $(b_{k-1}-\varepsilon,\text{sgn}(c_{k-1}))$ and $(a_{k}+\varepsilon,\text{sgn}(c_{k}))$ on the interval $[b_{k-1}-\varepsilon,a_k+\varepsilon]$, and is also the line segment connected the points $(b_k-\varepsilon,\text{sgn}(c_k))$ and $(a_{k+1}+\varepsilon,\text{sgn}(c_{k+1}))$ on the interval $[b_k-\varepsilon,a_{k+1}+\varepsilon]$. Here 
$$\text{sgn}(x):=\begin{cases} 1,&\text{if}\ x>0,\\
0,&\text{if}\ x=0,\\
-1,&\text{if}\ x<0.
\end{cases}$$ We see that $f$ is continous with sup-norm $1$ and $h_x(y)f(y)=h(x,y)f(y)$ agrees with $|h_x(y)|=|h(x,y)|$ on the set $[a_k+\varepsilon,b_k-\varepsilon]$ for $1\leq k\leq m$, thus
$$\int_a^b h(x,y)f(y)\,dy\geq \int_{a}^b |h(x,y)|\,dy-4mM\varepsilon,$$
where $M$ is the maximum of $|h|$ on $[a,b]\times[a,b]$.
A: This is not obvious. Here is a proof, which is not completely elementary because it uses (a little bit of) measure theory. In what follows, I denote by $\lambda$ the Lebesgue measure on $[a,b]$.
First, choose a point $x_0\in [a,b]$ such that $$\int_a^b \vert k(x_0,y)\vert \, dy=\max_{a\leq x\leq b} \int_a^b \vert  k(x,y)\vert\, dy\, ,$$ and denote by $k_0$ the function $y\mapsto k(x_0,y)$.
It is enough to show that for any given $\varepsilon>0$, one can find a function $f\in\mathcal C([a,b])$ such that $$\Vert f\Vert_\infty\leq 1\qquad{\rm and}\qquad \int_a^b k_0(y)f(y)\, dy\geq \int_a^b \vert k(x_0,y)\vert \,dy-\varepsilon\, .$$
Set $V^+:=\{ y\in\, ]a,b[\,;\; k_0(y)>0\}$ and $V^-:=\{ y\in\,]a,b[\, ;\; k_0(y)<0\}$. These are open subsets of $\mathbb R$ because $k_0$ is a continuous function. So there exist two (possibly finite) sequences of pairwise disjoint open intervals $(J_n^+)_{n\in\mathbb N}$ and $(J_m^-)_{m\in\mathbb N}$ such that $V^+=\bigcup_n J_n^+$ and $V^-=\bigcup_m J_m^-$. 
Since $\lambda$ is a finite measure, one can choose $N,M\in\mathbb N$ such that 
$$\lambda\left(V^+\setminus\bigcup_{n=1}^N J_n^+\right)<\varepsilon\qquad{\rm and}\qquad\lambda\left(V^-\setminus\bigcup_{m=1}^MJ_m^-\right)<\varepsilon .$$
Now, define a continuous function $f:[a,b]\to\mathbb R$ as follows: $f$ is equal to $1$ on every $J_n^+$, $n\leq N$, it is equal to $-1$ on every $J_m^-$, $m\leq M$, and it is extended continuously to $[a,b]$ by requiring it to be affine on all the remaining intervals. (You should draw a picture.)
Obviously, $\Vert f\Vert_\infty\leq 1$. Moreover, if we set $\Omega^+:=\bigcup_{1\leq n\leq N} J_n^+$ and $\Omega^-:=\bigcup_{m=1}^M J_m^-$ then, by the very definition of $f$, we have $k_0f=\vert k_0\vert$ on $\Omega^+\cup\Omega^-$. So we get
\begin{eqnarray*}\int_a^b k_0(y)f(y)\, dy&=&\int_{\Omega^+\cup \Omega^-} \vert k_0\vert+ \int_{V^+\setminus \Omega^+}k_0f+\int_{V^-\setminus\Omega^-} k_0f+\int_{\{ k_0=0\}} k_0f\\
&=&\int_{\Omega^+\cup \Omega^-} \vert k_0\vert+ \int_{V^+\setminus \Omega^+}k_0f+\int_{V^-\setminus\Omega^-} k_0f\\
&\geq &\int_{\Omega^+\cup\Omega^-}\vert k_0\vert-\Vert k_0\Vert_\infty\times\Bigl(\lambda(V^+\setminus\Omega^+)+\lambda(V^-\setminus\Omega^-)\Bigr)\\
&\geq &\int_{\Omega^+\cup\Omega^-}\vert k_0\vert-2\varepsilon\, \Vert k_0\Vert_\infty\, .
\end{eqnarray*}
Moreover, since  $\int_a^b \vert k_0\vert=\int_{\Omega^+\cup\Omega^-}\vert k_0\vert+\int_{V^+\setminus\Omega^+}\vert k_0\vert+\int_{V^-\setminus\Omega^-}\vert k_0\vert$ , we also have
$$\int_{\Omega^+\cup\Omega^-}\vert k_0\vert\geq \int_a^b \vert k_0\vert-\Vert k_0\Vert_\infty\times \Bigl(\lambda(V^+\setminus\Omega^+)+\lambda(V^-\setminus\Omega^-)\Bigr)\geq \int_a^b \vert k_0\vert-2\varepsilon\,\Vert k_0\Vert_\infty\, .$$
Altogether, this gives
$$\int_a^b k_0f \geq \int_a^b \vert k_0\vert-4\varepsilon\,\Vert k_0\Vert_\infty\, ,$$
and the result follows (upon replacing $\varepsilon$ with $\varepsilon/4\Vert k_0\Vert_\infty$).
