# What does any 2 Qbit Universal Gate in any Quantum Circuit with an N Qbit Input "operate on" mean mathematically

I am very new to Quantum Computing thus please excuse the layman question.

I am aware that just like classical gates Quantum Computation also has a set of universal gates. Moreover, a universal set of gates can be created that "operate on" at most 2 Quantum bits. And each such Gate can be/is represented by a set of matrices over complex numbers (https://en.wikipedia.org/wiki/Quantum_logic_gate, https://en.wikipedia.org/wiki/List_of_quantum_logic_gates).

Moreover, any set of N Qbits can always be represented by a vector of $$2^N$$ amplitudes such that each the square of each amplitude represents the probability that the Qbits will collapse to the corresponding state vector when measured.

Now here in lies my doubt: Conceptually in any quantum Circuit, a 'step' in computation is defined as "operating on" one or two qbits using the relevant gates (as far as I understand). But mathematically I am unclear what the word "operating on two Qbits mean"? Forgetting about Quantum Computing and everything else:

Query 1: Purely mathematically, what is the thing a Gate operates on mean? I understand an amplitude is a complex number, so does that mean any Gates takes in 2 Complex Numbers and transform them depending on the kind of Gate?

Query 2: For an N Qbit system/circuit there are $$2^N$$ amplitudes, so in any such circuit what does a random 2 Qbit Gate do mathematically? Does it still take 2 complex numbers and multiply them with the matrix representing the Gate or something else?

Most of the places (like wiki) they show a simple 2 Qbits in classical states and what a matrix does to them. Or simply use the "operate on" word without explaining what all that means in a $$N$$ Qbit generic system and an example. So if someone can please explain with an example what mathematically happens in any generic circuit when we use a word "operate on" it would be immensely helpful.

Please assume a complete lay person without background in QC (only conceptual ideas as described above).

In the case, that you have N qubits and you operate with a 2 qubit gate, in a mathematical point of view, you are acting with a matrix that is $$I_{N-2}\otimes G$$ over a vector of shape N, with G the two-qubit gate. Please note that is not a rule the qubits being the last two.