There's no need for any resistors - digital input pins have a very high impedance (in the order of megaohms IIRC), which means the current flowing through the switch into the pin is negligible (microamperes).
By the way, the screenshot of the matrix seems to be broken.