Construa as matrizes:
B4 times 4, tal que bi j=li+j, se i <= j i-j, se i>j

Passo 1

Beleza, vamos resolver esse exercício juntos! A gente precisa construir uma matriz B de tamanho 4 times 4 . Para cada elemento bij dessa matriz, a gente tem uma regra:
  • Se i <= j , então bij = i + j .
  • Se i > j , então bij = i - j .
Vamos precisar entender como preencher cada posição da matriz seguindo essas regras.

Passo 2

Primeiro, vamos lembrar que em uma matriz 4 times 4 temos 4 linhas e 4 colunas. Os índices i e j correspondem às linhas e colunas, respectivamente, e vão de 1 a 4. Então, vamos analisar cada posição da matriz verificando se i é menor ou igual a j ou se é maior.

Passo 3

Vamos montar a matriz passo a passo:
  • Primeira linha ( i = 1 ):
    • j = 1 : Como 1 <= 1 , b11 = 1 + 1 = 2 .
    • j = 2 : 1 <= 2 , então b12 = 1 + 2 = 3 .
    • j = 3 : 1 <= 3 , então b13 = 1 + 3 = 4 .
    • j = 4 : 1 <= 4 , então b14 = 1 + 4 = 5 .
  • Segunda linha ( i = 2 ):
    • j = 1 : 2 > 1 , então b21 = 2 - 1 = 1 .
    • j = 2 : 2 <= 2 , então b22 = 2 + 2 = 4 .
    • j = 3 : 2 <= 3 , então b23 = 2 + 3 = 5 .
    • j = 4 : 2 <= 4 , então b24 = 2 + 4 = 6 .
  • Terceira linha ( i = 3 ):
    • j = 1 : 3 > 1 , então b31 = 3 - 1 = 2 .
    • j = 2 : 3 > 2 , então b32 = 3 - 2 = 1 .
    • j = 3 : 3 <= 3 , então b33 = 3 + 3 = 6 .
    • j = 4 : 3 <= 4 , então b34 = 3 + 4 = 7 .
  • Quarta linha ( i = 4 ):
    • j = 1 : 4 > 1 , então b41 = 4 - 1 = 3 .
    • j = 2 : 4 > 2 , então b42 = 4 - 2 = 2 .
    • j = 3 : 4 > 3 , então b43 = 4 - 3 = 1 .
    • j = 4 : 4 <= 4 , então b44 = 4 + 4 = 8 .

Passo 4

Agora que calculamos todos os elementos, vamos montar a matriz completa:
B = b11 & b12 & b13 & b14 b21 & b22 & b23 & b24 b31 & b32 & b33 & b34 b41 & b42 & b43 & b44 = 2 & 3 & 4 & 5 1 & 4 & 5 & 6 2 & 1 & 6 & 7 3 & 2 & 1 & 8

Resposta

A matriz B construída é:
B = 2 & 3 & 4 & 5 1 & 4 & 5 & 6 2 & 1 & 6 & 7 3 & 2 & 1 & 8

Exercícios relacionados