# Computing adjoint of a linear operator

I would like to know how to find an adjoint of an operator $T$ on a Hilbert space.

I tried to find out on my own but it's not solid. Here is what I did:

I picked a concrete example. Let $H=\ell^2$ and let $R: H \to H$ be the right shift operator. Let $e_1 = (1,0,0,\dots), e_2=(0,1,0,0,\dots)$ etc. Then I used the definition of the adjoint and trial and error as follows:

Let $R^\ast$ denote the adjoint I am trying to find. I compute $\langle Re_1,e_1\rangle=0$ and $\langle e_1, R^\ast e_1\rangle = 1\cdot (R^\ast e_1)_1 = 0$. I did this same silly computation for a few more pairs of $e_1$ and $e_i$ until I started to suspect that $R^\ast e_1 = 0$. Similarly, $R^\ast e_2 = e_1$.

Applying a big leap of guessing I am pretty sure that $R^\ast$ is the left shift operator. But being pretty sure is just not good enough.

How does on go about this correctly? What is the correct method of finding the adjoint of a given operator on a Hilbert space?

Let $\{e_i\}$ be a basis of the Hilbert space, and say you want to find adjoint of $T$.
Recall that $T^*$ satisfies:
$\langle T^*x,y\rangle=\langle x,Ty \rangle$.
So, to find $T^*$ you need to find $\langle Te_i, e_j\rangle$.
Then further note that by Riesz representation theorem, if you know $\langle Sx,y \rangle$ for all $x,y \in H$ where $S$ is in $B(H)$ then you know $S$.