# sparse matrix in EKF SLAM

I've successfully done with EKF Localization Algorithm with known and unknown correspondences that are stated in "Probabilistic Robotics". The results make perfect sense,so I can estimate the position of a robot without using GPS or odometry. Now I've moved to EKF-SLAM with known correspondences in the same book. I don't understand this matrix

$$F_{x,j} = \begin{bmatrix} 1 & 0 & 0 & 0 \cdots 0 & 0 & 0 & 0 & 0 \cdots 0 \\ 0 & 1 & 0 & 0 \cdots 0 & 0 & 0 & 0 & 0 \cdots 0 \\ 0 & 0 & 1 & 0 \cdots 0 & 0 & 0 & 0 & 0 \cdots 0 \\ 0 & 0 & 0 & 0 \cdots 0 & 1 & 0 & 0 & 0 \cdots 0 \\ 0 & 0 & 0 & 0 \cdots 0 & 0 & 1 & 0 & 0 \cdots 0 \\ 0 & 0 & 0 & \underbrace{0 \cdots 0}_{3j-3} & 0 & 0 & 1 & \underbrace{0 \cdots 0}_{3N-3j} \\ \end{bmatrix}$$ What is exactly the bottom of this matrix? The following $$F_{x,j} = \begin{bmatrix} 0 \cdots 0 & 1 & 0 & 0 & 0 \cdots 0 \\ 0 \cdots 0 & 0 & 1 & 0 & 0 \cdots 0 \\ \underbrace{0 \cdots 0}_{3j-3} & 0 & 0 & 1 & \underbrace{0 \cdots 0}_{3N-3j} \\ \end{bmatrix}$$ Is it as following (assuming N = 3) $$F_{x,j} = \begin{bmatrix} 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1\\ \end{bmatrix}$$ Or $$F_{x,j} = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\ \end{bmatrix}$$ where ones' represent a specific landmark.

It is certainly your second guess, i.e.:

$$F_{x,j} = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\ \end{bmatrix}$$

If you pay attention, the columns that are repeated (with ...) contain all zeros, both the first column and the last.

If they wanted to show your first guess, they would have written something like this:

$$F_{x,j} = \begin{bmatrix} 1 \cdots 0 & 1 & 0 & 0 & 1 \cdots 0 \\ 0 \cdots 0 & 0 & 1 & 0 & 0 \cdots 0 \\ \underbrace{0 \cdots 1}_{N} & 0 & 0 & 1 & \underbrace{0 \cdots 1}_{N} \\ \end{bmatrix}$$

Note that now the first element of the first column is 1 and the last element of the last column is also 1, showing that the 1 moves from top to bottom on each column. Note also that the number of columns (previously 3j-3 and 3N-3j) are now changed to N (the number of rows, let's assume) because otherwise the pattern and the number of columns would be inconsistent.

• Is it 3j-3 or 2j-2? Is it 3N-3j or 2N-2j? I found 2j-2 and 2N-2j in the book. – user20203 Jun 15 '18 at 17:19