Consider the following code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,intersections,calc}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,row sep={4em,between origins},column sep={5em,between origins},nodes={anchor=base}]{
|[draw,inner sep=5pt,name path=border1]| \frac{A}{B}& E \\
C & D \\ };
\draw[->,name path=line1] (m-1-1.base west) -- (m-2-2.north east);
\fill [name intersections={of=line1 and border1},green] (intersection-1) circle (1.5pt) (intersection-2) circle (1.5pt);
\fill [red] ($(m-1-1.base)+(intersection-1)$) circle (1.5pt) ($(m-1-1.base)+(intersection-2)$) circle (1.5pt);
\end{tikzpicture}
\end{document}
with result:
It aims to find (in green) the intersection of the rectangular border (drawn, and named 'border1') of the top left node (m-1-1) with the only arrow in the diagram. However, as you can see, the intersection points in green do not lie on the border of (m-1-1). Instead, only the shifts of the green points by the point (m-1-1.base), which are drawn in red, do lie on the border.
This indicates that the path named 'border1' is not placed on the top left node, but instead placed somewhere at the centre of the whole picture. More precisely, it seems that the actual border of the node (m-1-1) is 'border1' shifted by (m-1-1.base).
So a few questions relating to this, and how to solve my problem:
Why is 'border1' what it is, instead of being the actual border of (m-1-1)?
Is it possible to do something different so as to obtain the actual border of the node (instead of the border shifted to the centre of the picture), in a manner that we can then use it to calculate intersections?
Given the path 'border1' (after it has been drawn), how can we create a copy of it which is shifted by (m-1-1.base), which we can then use to compute intersections? (By the way, what if we don't know that the node is anchored at (m-1-1.base)?)