How do I write an operator in Dirac notation? 
Tritter is a generalisation of the fifty-fifty beam-splitter to situations where photons can propagate along three paths. It has the following matrix representation:
  $$T\equiv\left(\begin{array}{ccc} 1 & 1 & 1 \\ 1 & \alpha & \alpha^2 \\ 1 & 
\alpha^2 & \alpha\end{array}\right),\qquad\text{where }\alpha=\exp(i2\pi/3)$$
  (a) Is $T$ unitary/hermitian? (Hint: Note that $1+\alpha+\alpha^2=0$).
  (b) Matrix $T$ is written in the following representation: $\vert0\rangle\leftrightarrow(1\,0\,0)^T$, $\vert1\rangle\leftrightarrow(0\,1\,0)^T$ and $\vert2\rangle\leftrightarrow(0\,0\,1)^T$. Write the tritter operator in Dirac notation.

What does the question mean by part b) ? Do I have to make a matrix representation like 
$$T = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$
and how does this relate to the question?
Additionally, is there a formula to find an operator in Dirac notation?
 A: They are simply defining the states $\lvert 0 \rangle, \lvert 1 \rangle, \lvert 2 \rangle$ as the orthonormal basis in which the matrix has been written. In general, any operator can be written in the form $\sum_{i,j}c_{ij}\lvert i \rangle \langle j \rvert$ where the sum is carried out over a set of basis states, and $c_{ij}$ are the matrix elements in the chosen basis.
Think about how matrix multiplication works and write a sum that has the same effect as the matrix you were given.
A: OstrichCamel's hint is certainly correct, but I'd like to say that I can see why you are confused because you're being asked to write the same thing again in a trivially different notation (you simply do as OstrichCamel suggests). You're essentially being asked to tell the subtle difference between a linear operator and its matrix. To help you see what's going on, write an intermediate answer, whereby one defines what happens in Dirac notation by stating the images of the three basis states $|0\rangle$, $|1\rangle$, $|2\rangle$. This intermediate answer is going to be three lines stating these images: the first is:
$$|0\rangle \stackrel{T}{\mapsto}\frac{1}{\sqrt{3}}\left(|0\rangle+|1\rangle+|2\rangle\right)$$
and I'll leave you to finish. So part of the operator (three out of its nine components) is:
$$T = \frac{1}{\sqrt{3}}\left(|0\rangle\langle0| +|1\rangle\langle0|+|2\rangle\langle0|\right) + \cdots$$
