To find the rank of the matrix \( A = \begin{pmatrix} 1 & -2 & 1 & -1 \\ 1 & 1 & -2 & 3 \\ 4 & 1 & -5 & 8 \\ 5 & -7 & 2 & -1 \end{pmatrix} \), we will reduce it to its Echelon form through a series of row operations.
### Step 1: Write the matrix
We start with the matrix:
\[
A = \begin{pmatrix} 1 & -2 & 1 & -1 \\ 1 & 1 & -2 & 3 \\ 4 & 1 & -5 & 8 \\ 5 & -7 & 2 & -1 \end{pmatrix}
\]
### Step 2: Row operations to create zeros below the first pivot
We will use the first row to eliminate the entries below the first pivot (which is 1 in the first row, first column).
- For \( R_2 \): \( R_2 \leftarrow R_2 - R_1 \)
- For \( R_3 \): \( R_3 \leftarrow R_3 - 4R_1 \)
- For \( R_4 \): \( R_4 \leftarrow R_4 - 5R_1 \)
Calculating these:
1. \( R_2 = (1 - 1, 1 - (-2), -2 - 1, 3 - (-1)) = (0, 3, -3, 4) \)
2. \( R_3 = (4 - 4, 1 - (-8), -5 - 4, 8 - (-4)) = (0, 9, -9, 12) \)
3. \( R_4 = (5 - 5, -7 - 10, 2 - 5, -1 - (-5)) = (0, 3, -3, 4) \)
Now, the matrix looks like:
\[
\begin{pmatrix} 1 & -2 & 1 & -1 \\ 0 & 3 & -3 & 4 \\ 0 & 9 & -9 & 12 \\ 0 & 3 & -3 & 4 \end{pmatrix}
\]
### Step 3: Further simplify the matrix
Next, we can simplify \( R_3 \) and \( R_4 \) by using \( R_2 \):
- For \( R_3 \): \( R_3 \leftarrow R_3 - 3R_2 \)
- For \( R_4 \): \( R_4 \leftarrow R_4 - R_2 \)
Calculating these:
1. \( R_3 = (0, 9 - 9, -9 + 9, 12 - 12) = (0, 0, 0, 0) \)
2. \( R_4 = (0, 3 - 3, -3 + 3, 4 - 4) = (0, 0, 0, 0) \)
Now, the matrix is:
\[
\begin{pmatrix} 1 & -2 & 1 & -1 \\ 0 & 3 & -3 & 4 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}
\]
### Step 4: Determine the rank
The rank of a matrix is the number of non-zero rows in its Echelon form. Here, we have:
1. \( R_1 \): Non-zero
2. \( R_2 \): Non-zero
3. \( R_3 \): Zero
4. \( R_4 \): Zero
Thus, the rank of the matrix \( A \) is 2.
### Final Answer
The rank of the matrix \( A \) is \( \boxed{2} \).