How to create the tables in Matrix form

How to create the tables in Matrix form

When i enter 3 in the input box it should be able to create a 3X3 tables (i mean 9 tables should be created) dynamically and it can happen up to 64, how can we do in jquery, Any help would be  appreciated.