 In our previous video, we introduced the idea of a linear code, which is gonna be the null space of some matrix H. So for this example, we're gonna use this matrix right here, this three by five matrix. And so we talked about the efficacy of such a code. We are able to decide, oh, our code could detect two errors and correct them all, right? But we have to also talk about what does the encoding map, what does the decoding map look like if we're using a linear code? It turns out that the matrix in play gives us exactly the tools we need to be able to do. In this video, I wanna talk about the decoding process because if we're talking about the null space, the null space is gonna be all these vectors y such that H y is equal to zero, the zero vector. So we can actually check very quickly whether a vector is a code word or not by multiplying that code word by H because H x should equal zero. Let's take, for example, a code. Let's take the code 0 1 0 0 1 1, right? Now a code word needs to have the same number of bits as the columns of the matrix. Other than that, clearly it would be totally bonkers. Matrix multiplication wouldn't work here. But if we multiply the matrix H by this code, this receive message, I should say. We don't actually know if it's code word yet. That's what we're checking. Let's go through the arithmetic here. So remember when you do matrix multiplication, you're gonna take the row and you're gonna times it by the column vector. Essentially, you're just taking the dot product of the rows of H with the vector and play right here. And so when you take that dot product, you're gonna get zero plus zero plus zero plus zero, there's a lot of zeros here, plus one plus one. So that adds up to be two, which two, of course, reduces to zero mod two, okay? Then we do the second row times this vector right here and we're going to get a zero, a one, a zero, a zero, a one and a one. That adds up to be three, which reduces to one, mod two. And then finally, I will just clear off all of this off the screen. And then finally we take the third row times the vector and play right here. And so we end up with a zero, a zero, a zero, a zero, a zero and a one. That just becomes a one, of course. And so notice here, we end up with a zero, one, one, which honestly we could have stopped at this stage right here because this vector right here is not the zero vector. So the fact that H times X doesn't give you zero, this tells us that X is not in the null space of A. Therefore, error, error, error, we've just detected an error, right? Because the received code or the received message is not a legitimate code word because it's not inside of the null space. So one nice thing about linear codes is that the detection of errors is just comes down to matrix multiplication. When my receiver gets the message, we multiply it by the matrix, the matrix A for which the linear code is been derived from. If we get zero, that means it's a legitimate code word, we receive the message correctly. If we get something other than zero, it means there was an error. And so then the receiver has to either correct the error, which we'll talk about how to do that later, or we have to ask for retransmission because either way we know an error was detected. The encoding process is a little bit more involved and we'll talk about that in the next video.