so I am now guessing the reason I do not understand the matrix notation is that it is more related to quantum computers
I can understand the basic working of the Toffoli gate as explained in Wikipedia (it seems to be a basic type of combinational logic circuit) but I do not understand the bra-ket notation nor the matrix one
i will suggest u to read a book... "Quantum computing explained" by David McMahon... its a very basic book for Quantum Computing and also Dirac (i.e. Bra-Ket) notations... it will help!! :)