Here's how you can do a principal component analysis:
Let $X$ be a $n\times 3$ matrix in which each $1\times3$ row is one of your points and there are $n$ of them.
Let $\displaystyle (\bar x,\bar y,\bar z) = \frac 1 n \sum_{i=1}^n (x_i,y_i,z_i)$ be the average location of your $n$ points. Replace each row $(x_i,y_i,z_i)$ with $(x_i,y_i,z_i) - (\bar x,\bar y,\bar z)$. This is a linear transformation that amounts to replacing $X$ with $PX$, where $P$ is the $n\times n$ matrix in which every diagonal entry is $1-(1/n)$ and ever off-diagonal entry is $-1/n$. Note that $PX\in\mathbb R^{n\times 3}$. Notice that $P^2 = P = P^T$, so that $P^T P = P$.
Now look at the $3\times3$ matrix $(PX)^T PX = (X^T P^T) (P X) = X^T (P^T P) X = X^T P X$.
This matrix $X^T PX$ is $n$ times the matrix of covariances of the three variables $x$, $y$, and $z$. It is a symmetric positive definite matrix (or nonnegative definite, but not strictly positive definite, if the $n$ points all lie in a common plane). Since this matrix symmetric and positive definite, the spectral theorem tells us that it has a basis of eigenvectors that are mutually orthogonal, and the eigenvalues are nonnegative. Let $\vec e$ be the (left) eigenvector with the largest of the three eigenvalues. The the line you seek is
$$
\left\{ (\bar x,\bar y,\bar z) + t\vec e\ : \ t\in\mathbb R \right\}
$$
where $t$ is a parameter that is different at different points on the line, and $t=0$ at the average point $(\bar x,\bar y,\bar z)$.
Linear regression is a very general technique, which in this case reduces to
$$\hat{a}=\dfrac{\displaystyle\sum_{i=1}^n(y_i-\bar{y})(x_i-\bar{x})}{\displaystyle\sum_{i=1}^n(x_i-\bar{x})^2},$$
$$\text{and }\hat{b}=\bar{y}-\hat{a}\bar{x},$$
where $\bar{y}=\dfrac{1}{n}\displaystyle\sum_{i=1}^ny_i,$ and $\bar{x}=\dfrac{1}{n}\displaystyle\sum_{i=1}^nx_i.$
In your case $y_i$'s are $1,2,3$ and $x_i$'s are $1,3,4$ for $i=1,2,3$ respectively.
Best Answer
The regression line $y=ax$ can be fitted using the least square method:$$a =\frac{\sum{x_i y_i}}{\sum{x_i^2}}$$