There was a similar Post here for a 3x3 Matrix: android lock password combinations .
I'm not able to figure out a formula to find the possible combinations in general with a NxN matrix. My Phone for example has the possibility to chose between a 5x5 and a 6x6 Matrix for my unlock pattern and i would like to know how much more secure the 6x6 is in comparison to 5x5.
Restrictions for the patterns are: Minimum 1 Point, maximum N*N points, no point can be hit 2 times and you can't skip points in diagonal, horizontal and vertical lines from the actual point of your pattern.