Q:

Finding grid intersections with linear algebra?

Typically if you want to find where a given line intersects with a grid you just compute a division and you check if that division generates a remainder that is equals to $0$, and you do that for both $x$ and $y$ coordinates.
This is the arithmetic approach.
What is the equivalent in finding the intersections using vectors and matrices ? There is a simple approach for N dimensions ?

in this picture the intersections are marked with green circles .

A:

Proposition: Let a line $L$ in the Cartesian plane have two distinct "integer points" $(a,b),(c,d)$ (points whose coordinates are integers) with no integer points lying between these points on the line. Then all the integer points on the line are given by 
  $$\{(a,b)+z(c-a,d-b)\mid z\in \Bbb Z\}$$

Proof 1: (in terms of vector addition) Interpret $(a,b)=p$ and $(c,d)=q$ as "position vectors" that point from the origin to the respective point. The vector $v=q-p$ is the vector pointing from the tip of $p$ to the tip of $q$. Notice that since $p$ and $q$ have integer entries, so does $v$.
We claim that no other two integer points on $L$ are nearer to each other than $p$ is to $q$. Without loss of generality, let's say $a<c$ and that there is another pair of integer points $(a',b')=p',(c',d')=q'$ with $a'<c'$ which are more closely spaced than $p$ and $q$. Then $v'=q'-p'$ is an integer vector shorter than $v$ and pointing in the same direction. But then $p+v'$ points to an integer point strictly between $p$ and $q$, which is contradictory to our hypotheses.
On the other hand, every integer point is exactly $\|v\|$ away from another integer point on the line: you just add (or subtract) $v$ to a point $p$ and you have two such points.
So, every integer point on the line is given by $\{p+zv\mid z\in \Bbb Z\}$.

Proof 2 (in terms of transformations) We translate the plane so that $(a,b)$ lies on the origin. This is accomplished with the transformation $F(x,y)=(x,y)-(a,b)$. Our old line $L$ has become a new line $L'$ through the origin. Notice that since $(a,b)$ has integer coordinates, the integer points of $L$ were mapped exactly to the integer points of $L'$.
What we contend is that there is a right angle preserving linear transformation $T$ which maps the $x$ axis onto $L'$ such that the integer points of the $x$-axis are mapped onto the integer points of $L'$. It isn't necessarily an isometry: geometrically it can be viewed as a rotation followed by a dilation. Then translating back to $L$, we'll have all integer points of $L$.
Consider $(c-a,d-b)$. At right angles to this, we have $(-(d-b),c-a)$, which has exactly the same length. The matrix for mapping $(1,0)$ and $(0,1)$ respectively to these two vectors is then 
$$X=\begin{bmatrix}c-a&d-b\\ -(d-b)&c-a\end{bmatrix}$$
so that $(1,0)X=(c-a,d-b)$ and $(0,1)X=(-(d-b),c-a)$.
Putting everything together, the transformation is $F(x,y)=  (x,y)X+(a,b)$ to transform the $x$-axis onto our line $L$. In particular, for the integers $(z,0)$ on the $x$-axis:
$$(z,0)X+(a,b)=z(c-a,d-b)+(a,b)$$
as expected. We then argue that This in fact covers all integer points on $L$ is a similar manner as in the first proof. Our hypothesis of $(c,d)$ and $(a,b)$ having no integer points between, and the uniform spacing of the integer points requires this.

Why did I ask for the hypothesis of two integer points? It's completely possible for a line to have exactly one integer point. A line with two integer points must have a rational slope (or be vertical, in which case the integer points are obvious), so no line with an irrational slope can have two integer points. 
A line can even have zero integer points! The line $y=\pi$ is an example.

