Operators that act on the edge of a quantum spin chain with periodic boundaries Consider a quantum spin chain of length $N$. Each site/spin has the local Hilbert space $\mathbb{C}^d$ and so for the whole chain the Hilbert space is $(\mathbb{C}^d)^{\otimes N}$. Now for periodic boundaries, we impose that the Hamiltonian $H$ be (for simplicity let the interaction be only nearest neighbor)
$$H = \sum_i^N h_{i,i+1}, \qquad \text{with }\quad h_{N,N+1} = h_{N,1}. $$
Explicitly, each local interaction acts on any state $|\Psi \rangle \in (\mathbb{C}^d)^{\otimes N}$ as
$$I_1 \otimes I_2 \otimes \cdots \otimes I_{i-1} \otimes h_{i,i+1} \otimes I_{i+2} \otimes \cdots I_{N-1} \otimes I_N, \qquad \text{for } i=1,2,..,N-1, $$
where $I_j=I$ is just the identity operator/matrix (acting on $\mathbb{C}^d$) and the subscript is just to be explicit on what site it acts. 
My question is, how about $h_{N,N+1}=h_{N,1}$? Is it
$I_2 \otimes I_3 \otimes \cdots \otimes h_{N,1}$? If so, I am confused on how it acts on the Hilbert space, i.e. how does one differentiate $(I_2 \otimes I_3 \otimes \cdots \otimes h_{N,1})$ from $(I_1 \otimes I_2 \otimes \cdots \otimes h_{N,N+1})$ if one write it in terms of a matrix especially when doing a numerical calculation?
Or is it better to work on $(\mathbb{C}^d)^{\otimes N+1}$ and put a constraint that the 1st spin and $(N+1)$th spin are always on the same state?
 A: So just to extend my comment as an answer: Consider a two-body Hamiltonian $h$ defined on $\mathbb{C}^d \otimes \mathbb{C}^d$, it can always be expanded as $h=\sum_p A^{(p)} \otimes B^{(p)}$, where $A^{(p)}$ and $B^{(p)}$ are operators acting on $\mathbb{C}^d$. Now a translation-invariant spin-chain Hamiltonian defined on $N$ sites with periodic boundary condition, where the local two-body interaction is given by the term $h$, can be written as 
$$H = \sum_i^N h_{i,i+1}, \qquad \text{with }\quad h_{N,N+1} = h_{N,1}, $$
where for the case $i<N$, we have
$$h_{i, i+1}=\sum_{p} \, I_1 \otimes I_2 \otimes \cdots \otimes I_{i-1} \otimes A^{(p)} \otimes B^{(p)} \otimes I_{i+2} \otimes \cdots I_{N-1} \otimes I_N, \qquad \text{for } i=1,2,..,N-1, $$
while for $i=N$
$$h_{N, N+1}=h_{N,1}=\sum_{p} \, B^{(p)} \otimes I_2 \otimes \cdots  \otimes  I_{N-1} \otimes I_{N-1} \otimes A^{(p)}. $$
A: You seem to be confused by the basis-dependent definition of a tensor product. 
$$A \otimes B = \left( \begin{array}{cccc}
a_{11} b_{11} & a_{11}b_{12} & a_{12}b_{11} & a_{12}b_{12} \\
a_{11} b_{21} & a_{11}b_{22} & a_{12}b_{21} & a_{12}b_{22} \\
a_{21} b_{11} & a_{21}b_{12} & a_{22}b_{11} & a_{22}b_{12} \\
a_{21} b_{21} & a_{21}b_{22} & a_{22}b_{21} & a_{22}b_{22} 
\end{array}\right). $$
If you have a matrix $A_{13}$  on a Hilbert space ${\cal H_1} \otimes {\cal H_3}$ and a matrix $I_2$ on a Hilbert space ${\cal H}_2$, the above definition of a tensor product does not apply. You cannot write the tensor product the way it is written above. I'm not going to write down the $8 \times 8 $ matrix for $A_{13} \otimes I$, but the first two rows are 
$$
\left(\begin{array}{cccccccc}
a_{1111} & a_{1112} & 0 & 0 &  a_{1211} & a_{1212}  & 0 & 0\\
a_{1121} & a_{1122} & 0 & 0 &  a_{1221} & a_{1222} & 0 & 0
\end{array}\right).
$$
