$$AB=AC \ \iff \ AD=0 \ \ \text{with} \ \ D:=A-B \neq 0 \ \ \text{by hypothesis}$$
$AD=0$ is equivalent to the fact that, for each column vector $D_k$ ($k=1...n$) of $D$, we have:
$\tag{1} \forall k, \ \ AD_k=0 \ \ \iff \ \ D_k \in Ker A.$
2 cases can occur:
if rank$(D)=n$: $\iff \ D \ $ invertible$ \iff \ $ (in view of (1)) $ \ \ker(A) \ $ possesses $n$ independent vectors $ \ \iff \ \ker(A)=\mathbb{R^n} \ \iff \ A=0$: impossible.
if rank$(D) < n$: A matrix $A$ can be found.
Her is the explanation: there exist at least a linear combination :
$$a_1D_1+a_2D_2+\cdots a_nD_n=0$$
In this case, define $A$ as the matrix with all its lines made of entries:
$$a_1,a_2,\cdots a_n$$
Conclusion: Here is a "recipe" for finding $A,B,C$:
- take any matrices $B,C$ as long as $B-C$ is not full rank (for example 2 random matrices with two identical last columns).
Pick a vector $\pmatrix{a_1\\a_2\\...\\a_n}$ in $\ker(B-C)$ and take
$$A=\begin{pmatrix}1 \\ 1 \\...\\ 1\end{pmatrix}\pmatrix{a_1 & a_2 &...& a_n}$$