Now, a degree and that's a technical term, a degree that is the number of links of each node. So actually each link has two degrees. One for each node that it connects to. So if you talk about links you have one, and if you talk about degrees you have two. Two degrees because it connects to two different nodes. Very important distinction. These degrees then in a directed networks can be in-degrees, that's the number of incoming links to the nodes, and out-degrees, the number of outgoing links to a node. In undirected networks, you don't have this distinction between in-degree and out-degree but you still have two degrees because it docks onto two nodes. Degrees are just the total number of in-degrees and out-degrees. So now you can ask different questions. How many degrees does this network have? What's the degree of Magda? What's the degree of Magda means how many degrees does she have. What's the in-degree of Magda and what's the out-degree of Magda? Now, we can just go to this network and basically count it. Just counting our arrows, this is a directed network that we had here, or we can do the little bit of systematically because if you have Twitter networks, or Facebook networks or any other networks with thousands and tens of and hundreds of thousands of nodes, you don't just want to count it manually. So basically what you do is you present networks in matrix form and use matrix algebra in order to do that. So I already showed you that adjacency matrix that we created before, and now instead of having these arrows in adjacency matrix, I just use zeros and ones. In this case, I assumed that a self connection is a zero, so it doesn't really matter to me if somebody is connected to themselves, and every other previous arrow is now a one, and if there was no error no, connection, it's now a zero. The interesting thing is, the good thing is now you can basically just sum up the rows. So you see now is some of row of Jorge. I sum up the row, I can clearly 1 plus 1 is 2. I can sum up Maria, so Maria's connected to Jorge, and she's connected to Magda. So I know the out-degree of Maria, two links go out to out-degree. So the out-degree of Maria is two. So she connects to people, I just summed up this row. Juan, there's no out-degree. Juan himself doesn't connect to anybody. What about Magda? So what is the out-degree of Magda? Yeah, it's also two. So if you put in a one, Magda connects to Maria, and Magda connects to Juan, that's the out-degree. What about the in-degree? How many links get to you? What would you do basically now is you sum up the columns. So Jorge, and please take the time to make sure that this is correct so have a close look at it, Jorge receives one connection only for Maria. So if the sum of the column is Jorge, only get a one. So Maria goes and connects to Jorge. So Maria herself she gets two in-degrees. One from Jorge and one for Magda. So now, I have here the degree distribution, the in and out-degree distribution, I can also see how uniformly is distributed. Often what we find in social networks is that they are exponentially very few people who have exponentially many links, and exponentially many people who have exponentially fueling. These are called scale-free networks, the links as distributed according to a power law extremely unequal. There are many people in the long tail of the network distribution, and if you represent it in this way, you can basically simply represent and quickly calculate the network distribution. Most network analysis works with matrix algebra. So if you have ever worked with matrix algebra, you will see some other terms later on that we will use here like eigenvector centrality for example. That's a term also from matrix algebra. So the benefit is that often the computer does the matrix algebra, so you don't have to flip your matrices by hand. But if you ever had an insight into matrix algebra about network analysis, it's basically applying matrix algebra.