Well, without getting into too much detail, a matrix is a two-dimensional array; this means you have one "parent" array, and each element of that array is its own array.
// parent array
var matrix = new Array(3);
// each element of the parent array is its own array
matrix[0] = new Array(3);
matrix[1] = new Array(3);
matrix[2] = new Array(3);
You could use JavaScript to show and hide a 3x3 table of input fields whose values could be accepted through form input (it'd be best to make sure your form doesn't actually submit, since that would involve page refreshes). Make sure you check the fields for valid input (numbers only) before you accept them.
Then, when a button is clicked, I'd use for loops to iterate through both dimensions of both matrices and use those values to add, subtract, and multiply those values.
I'm not sure what is meant by "Quit"; maybe that means your matrices are cleared so that new values may be entered. Are you sure you don't mean that you are programming in Java? This answer would be similar in Java, though the syntax would be different. If so, you would either have to accept input through the Console (using a Scanner) or, if you're using a GUI, through a form control (JTextField in a JFrame, TextField in an AWT frame).