Application of $(Ax)^Ty = x^T(A^Ty)$ I am working on this exercise:

Wires go between Boston, Chicago, and Seattle. Those cities are at voltages $x_B$, $x_C$, $x_S$. With unit resistances between cities, the three currents are in $y$:
$y = Ax$
is
$\begin{bmatrix}y_{BC}\\y_{CS}\\y_{BS}\end{bmatrix} = \begin{bmatrix}1 &-1&0\\ 0&1&-1\\1 &0 &-1 \end{bmatrix} \begin{bmatrix}x_{B}\\x_{C}\\x_{S}\end{bmatrix}$
(a) Find the total currents $A^Ty$ out of the three cities.

However, I did not understand why the operation $A^Ty$, and specifically the use of the transpose of $A$, yields the total currents out of the three cities.
 A: See Mathwonk’s answer for the short version. I’ll try to keep this brief, but it still might be more information than you wanted.
We can view this electrical circuit as a graph (more formally, a one-complex) that consists of three nodes (the cities) labeled $B$, $C$ and $S$ and a directed branch (wire) between each pair of nodes. We also have what’s called the boundary map $\operatorname{\partial}$, which describes which branches connect which nodes and assigns a direction to them. Various vector spaces indexed by the nodes or the branches can be associated with this graph. These vector spaces can be used to represent various things including node potentials (voltages), voltage drops along branches, branch currents, net node current flow, &c. The boundary map can then be thought of as a linear map from $C_1$, a vector space indexed by the branches to $C_0$, a space indexed by the nodes.
In this case, we have a branch going from $B$ to $C$, one from $C$ to $S$ and one from $B$ to $S$. By convention, we take the direction going toward a node as positive. Using the same order for these nodes and branches as in the problem statement, $\operatorname{\partial}$ can be encoded as the matrix $$
\operatorname{\partial} = \pmatrix{-1&0&-1\\1&-1&0\\0&1&1}.
$$ (Notice that this is $-A^T$. There’s a simple reason for the negative sign, which I’ll get to later.) If we think of a vector $\mathbf J\in C_1$ as describing an assignment of electric currents to the branches of the graph, then the boundary map tells us how to compute the net current flowing into each node (this isn’t too hard to prove for yourself). Incidentally, Kirchhoff’s current law can be expressed as $\operatorname{\partial}\mathbf J=0$, but we don’t need that here.  
Now consider an assignment of voltage drops $\mathbf V$ to branches. If we have a set of branch currents $\mathbf J$, the total power dissipated in the circuit is $\sum V_\alpha J_\alpha$, the sum taken over all of the branches. We can thus view $\mathbf V$ as being a linear function of vectors in $C_1$, i.e., an element of the dual space $C_1^*$, usually called $C^1$. Vectors in these two spaces are related via the resistances in the branches: $\mathbf V=Z\mathbf J$, where $Z$ is a diagonal matrix with the branch resistances along the diagonal.  
Similarly, an assignment of potentials (voltages) to the nodes can be represented by an element $\mathbf\Phi$ of $C^0$, the dual space to $C_0$. The adjoint of the boundary map, $\operatorname{\partial}^*=\operatorname{d}$, then goes from $C^0$ to $C^1$. If we use dual bases for these four spaces (which happily, the standard bases are), the matrix of $\operatorname{d}$ is simply the transpose of the matrix of $\operatorname{\partial}$. Each row of this matrix computes the difference of coordinates at a pair of nodes, so if we apply it to a node potential vector, it will produce the potential differences across the branches of the circuit. By convention, we use voltage drops, so if $\mathbf\Phi$ is an assignment of potentials to nodes, we have $\mathbf V=-\operatorname{d}\mathbf\Phi$ (this is one form of Kirchhoff’s voltage law).  
Putting this all together, given an assignment of potentials to nodes $\mathbf\Phi$, the branch currents are given by $\mathbf J=-Z^{-1}\operatorname{d}\mathbf\Phi$. In your case, $x=\mathbf\Phi$ and, since all of the resistances are unity, $Z=I$, so $\mathbf J=y=Ax$ and thus $\operatorname{d}=-A$. This means that $\operatorname{\partial}=-A^T$ and so the node currents are $\operatorname{\partial}\mathbf J=-A^Ty$. Why the negative sign? It’s because I’ve followed the common convention that a positive value represents current flow into a node, but the problem asks for the net current flowing out.  
The key things to take away for this problem about the matrices $A$ and $A^T$ is that the rows of $A$ encode the directed connections between the nodes of the graph and that its transpose then gives a way to compute the net flow out of them.
A: If you interpret the matrix as the description of a directed graph, (arrows exiting from each starting city to all ending cities, for all segments in the network) then the transpose matrix describes the way network segments enter each city.)  Try drawing a network diagram for this case of three cities to confirm this.
