randRange(1,9,4,4) randRange(1,9,4,1) [A[0][0]*X[0][0]+A[0][1]*X[1][0]+A[0][2]*X[2][0]+A[0][3]*X[3][0],A[1][0]*X[0][0]+A[1][1]*X[1][0]+A[1][2]*X[2][0]+A[1][3]*X[3][0], A[2][0]*X[0][0]+A[2][1]*X[1][0]+A[2][2]*X[2][0]+A[2][3]*X[3][0],A[3][0]*X[0][0]+A[3][1]*X[1][0]+A[3][2]*X[2][0]+A[3][3]*X[3][0] ]

init({ range: [ [ -5, 18.65 ], [ -1.1, 1.1 ] ] }); graph.pic0 = new ImportPictureb("img_01.jpg", [15, 0], 1.0, 100, 100 ) addMouseLayer(); graph.point1 = addMovablePoint({ coord: [ 11, 0 ] }); graph.point2 = addMovablePoint({ coord: [ 17, 0 ] }); graph.line1 = addMovableLineSegment({ pointA: graph.point1, pointZ: graph.point2, fixed: true });
A = \left[ \begin{array}{rcl} A[0][0]&A[0][1]&A[0][2]&A[0][3]\\ A[1][0]&A[1][1]&A[1][2]&A[1][3]\\ A[2][0]&A[2][1]&A[2][2]&A[2][3]\\ A[3][0]&A[3][1]&A[3][2]&A[3][3]\\ \end{array} \right] , \boldsymbol {x} = \left[ \begin{array}{rcl} X[0][0]\\ X[1][0]\\ X[2][0]\\ X[3][0]\\ \end{array} \right]

Compute A \boldsymbol {x} = \left[ \begin{array}{rcl} \color{BLUE}{b_1}\\ \color{BLUE}{b_2}\\ \color{BLUE}{b_3}\\ \color{BLUE}{b_4} \end{array} \right]

\color{BLUE}{b_1} = AX[0]

\color{BLUE}{b_2} = AX[1]

\color{BLUE}{b_3} = AX[2]

\color{BLUE}{b_4} = AX[3]

graph.point3 = addMovablePoint({ coord: [ 12, 0 ] }); graph.point4 = addMovablePoint({ coord: [ 13, 0 ] });
init({ range: [ [ -5, 18.65 ], [ -0.5, 0.5 ] ] }); addMouseLayer(); graph.point3 = addMovablePoint({ coord: [ 12, 0 ] }); graph.point4 = addMovablePoint({ coord: [ 13, 0 ] });

Because you are multiplying a 4x4 Transformation Matrix by a 4x1 Position Vector
the Solution will be a 4x1 Position Vector.
The first entry in the product A\boldsymbol {x} is the sum of the products (the dot product), using the first row of A and the entries in \boldsymbol {x}:
\left[ \begin{array}{rcl} \color{BLUE}{a_{11}}&\color{GREEN}{a_{12}}&\color{ORANGE}{a_{13}}&\color{BLUE}{a_{14}}\\ \\ \\ \end{array} \right] \left[ \begin{array}{rcl} \color{BLUE}{x_1}\\ \color{GREEN}{x_2}\\ \color{ORANGE}{x_3}\\ \color{BLUE}{x_4}\\ \end{array} \right] =\left[ \begin{array}{rcl} \color{BLUE}{{a_{11}}x_1} + &\color{GREEN}{{a_{12}}x_2}+\color{ORANGE}{{a_{13}}x_3}+\color{BLUE}{{a_{14}}x_4}\\ \\ \\ \end{array} \right]

\left[ \begin{array}{rcl} \color{BLUE}{A[0][0]}&\color{GREEN}{A[0][1]}&\color{ORANGE}{A[0][2]}&\color{BLUE}{A[0][3]}\\ \\ \\ \end{array} \right] \left[ \begin{array}{rcl} \color{BLUE}{X[0][0]}\\ \color{GREEN}{X[1][0]}\\ \color{ORANGE}{X[2][0]}\\ \color{BLUE}{X[3][0]}\\ \end{array} \right] =\left[ \begin{array}{rcl} \color{BLUE}{{(A[0][0])}(X[0][0])} + &\color{GREEN}{{(A[0][1])}(X[1][0])}+\color{ORANGE}{{(A[0][2])}(X[2][0])}+\color{BLUE}{{(A[0][3])}(X[3][0])}\\ \\ \\ \end{array} \right]

= \left[ \begin{array}{rcl} A[0][0]*X[0][0] + A[0][1]*X[1][0] + A[0][2]*X[2][0]+ A[0][3]*X[3][0] \\ \\ \end{array} \right]

Thus, \left[ \begin{array}{rcl} \color{BLUE}{b_1} \\ \\ \end{array} \right] = \left[ \begin{array}{rcl} A[0][0]*X[0][0] + A[0][1]*X[1][0] + A[0][2]*X[2][0]+ A[0][3]*X[3][0] \\ \\ \end{array} \right]

The second entry in the product A\boldsymbol {x} is the sum of the products (the dot product), using the second row of A and the entries in \boldsymbol {x}:
\left[ \begin{array}{rcl} \color{BLUE}{a_{21}}&\color{GREEN}{a_{22}}&\color{ORANGE}{a_{23}}&\color{BLUE}{a_{24}}\\ \\ \\ \end{array} \right] \left[ \begin{array}{rcl} \color{BLUE}{x_1}\\ \color{GREEN}{x_2}\\ \color{ORANGE}{x_3}\\ \color{BLUE}{x_4}\\ \end{array} \right] =\left[ \begin{array}{rcl} \color{BLUE}{{a_{21}}x_1} + &\color{GREEN}{{a_{22}}x_2}+\color{ORANGE}{{a_{23}}x_3}+\color{BLUE}{{a_{24}}x_4}\\ \\ \\ \end{array} \right]

The third entry in the product A\boldsymbol {x} is the sum of the products (the dot product), using the third row of A and the entries in \boldsymbol {x}:
\left[ \begin{array}{rcl} \color{BLUE}{a_{31}}&\color{GREEN}{a_{32}}&\color{ORANGE}{a_{33}}&\color{BLUE}{a_{34}}\\ \\ \\ \end{array} \right] \left[ \begin{array}{rcl} \color{BLUE}{x_1}\\ \color{GREEN}{x_2}\\ \color{ORANGE}{x_3}\\ \color{BLUE}{x_4}\\ \end{array} \right] =\left[ \begin{array}{rcl} \color{BLUE}{{a_{31}}x_1} + &\color{GREEN}{{a_{32}}x_2}+\color{ORANGE}{{a_{33}}x_3}+\color{BLUE}{{a_{34}}x_4}\\ \\ \\ \end{array} \right]

The fourth entry in the product A\boldsymbol {x} is the sum of the products (the dot product), using the fourth row of A and the entries in \boldsymbol {x}:
\left[ \begin{array}{rcl} \color{BLUE}{a_{41}}&\color{GREEN}{a_{42}}&\color{ORANGE}{a_{43}}&\color{BLUE}{a_{44}}\\ \\ \\ \end{array} \right] \left[ \begin{array}{rcl} \color{BLUE}{x_1}\\ \color{GREEN}{x_2}\\ \color{ORANGE}{x_3}\\ \color{BLUE}{x_4}\\ \end{array} \right] =\left[ \begin{array}{rcl} \color{BLUE}{{a_{41}}x_1} + &\color{GREEN}{{a_{42}}x_2}+\color{ORANGE}{{a_{43}}x_3}+\color{BLUE}{{a_{44}}x_4}\\ \\ \\ \end{array} \right]

Which makes this the "stack" of dot product operations between the row vectors in A and the, column vector \boldsymbol {x}:
A\boldsymbol {x} = \left[ \begin{array}{rcl} A[0][0]*X[0][0]+A[0][1]*X[1][0]+A[0][2]*X[2][0]+A[0][3]*X[3][0]\\ A[1][0]*X[0][0]+A[1][1]*X[1][0]+A[1][2]*X[2][0]+A[1][3]*X[3][0]\\ A[2][0]*X[0][0]+A[2][1]*X[1][0]+A[2][2]*X[2][0]+A[2][3]*X[3][0]\\ A[3][0]*X[0][0]+A[3][1]*X[1][0]+A[3][2]*X[2][0]+A[3][3]*X[3][0]\\ \end{array} \right]