Collecting Matrices when solving laplace transform \begin{align}
\tag{1}
\dot x&=Ax\\ 
\tag{2}
sX(s)-x(0)&=AX(s) \\
\tag{3}
(sI-A)X(s)&=x(0)
\end{align}
Considering these equations, how can we go from $(2)$ to $(3)$?
My question is why was the identity matrix $I$ introduced here? My concern is about introducing $I$ when collecting $X(s)$.
Thanks
 A: $$
sX(s)-x(0)=AX(s) \\
sX(s)-AX(s)=x(0) \\
$$
In the second equation, notice that there is a factor of $X(s)$ on the right-hand side of both $sX(s)$ and $AX(s)$, so we can take it out like so:
$$(s-A)X(s)=x(0)$$
But this wouldn't make any sense, because $A$ is a matrix and $s$ is a scalar. To make it so that the equation makes sense, we make $s$ into a matrix by multiplying by the identity.
$$(sI-A)X(s)=x(0)$$
This is just to ensure that it doesn't matter which way round we do things. We could do $sI-A$ first, and then multiply the result by $X(s)$ on the right, or we can multiply through by $X(s)$ to get 
$$sIX(s)-AX(s)=sX(s)-AX(s)$$ 
which is what you started with. 
Adding the identity $I$ doesn't change the value of the equation, it's just so that it "makes sense" if we were to do the subtraction before the matrix multiplication.
A: $$\begin{array}{rcl}
\dot x&=Ax \\ 
sX(s)-x(0)&=AX(s) \\
sX(s)-AX(s)&=x(0) \\
sIX(s)-AX(s)&=x(0) \\
(sI-A)X(s)&=x(0)
\end{array}$$
$I$ was already there but it wasn't written, because writing it doesn't change the meaning of the expression. Consider this analogical example from scalar equations:
$$\begin{array}{rcl}
ab-a&=c \\
a(b-\underset{?}{\underset{\downarrow}{1}})&=c
\end{array}$$
How did that $1$ appear there? It wasn't there, was it? Yes it was there, but it wasn't written, it was hidden, because it is the identity element of multiplication, just like $I$ is in matrix case.
$$\begin{array}{rcl}
ab-a&=c \\
ab-a1&=c \\
a(b-1)&=c
\end{array}$$
The hidden identity element comes into appearance when it is needed. In your case, it has to appear, because when you take the common factor $X(s)$ out of the parenthesis, you left $s-A$ inside. The dimensions must match but they don't. It was originally a difference of matrices $(s(X(s)-AX(s))$, but now a difference between a scalar and a matrix $(s-A)$ which is an undefined operation.
