How to organize, add and multiply matrices - Bill Shillito

530,203 views ・ 2013-03-04

TED-Ed


Por favor, faça duplo clique nas legendas em inglĂȘs abaixo para reproduzir o vĂ­deo.

00:00
Translator: Andrea McDonough Reviewer: Bedirhan Cinar
0
0
7000
Tradutor: Isabel Villan Revisor: Viviane Ferraz Matos
00:14
By now, I'm sure you know
1
14020
1548
AtĂ© agora, tenho certeza de que vocĂȘ sabe
00:15
that in just about anything you do in life,
2
15568
1972
que, em quase tudo que faz na vida,
00:17
you need numbers.
3
17540
1706
vocĂȘ precisa de nĂșmeros.
00:19
In particular, though,
4
19246
1027
Entretanto, alguns campos
00:20
some fields don't just need a few numbers,
5
20273
2229
em especial nĂŁo precisam apenas de alguns nĂșmeros,
00:22
they need lots of them.
6
22502
1720
precisam de muitos deles.
00:24
How do you keep track of all those numbers?
7
24222
2026
Como vocĂȘ controla todos esses nĂșmeros?
00:26
Well, mathematicians dating back
8
26248
1916
Bem, matemĂĄticos que remontam
00:28
as early as ancient China
9
28164
1965
Ă  China antiga
00:30
came up with a way to represent
10
30129
1442
inventaram uma maneira de representar
00:31
arrays of many numbers at once.
11
31571
2577
conjuntos de muitos nĂșmeros de uma sĂł vez.
00:34
Nowadays we call such an array a "matrix,"
12
34148
3174
Atualmente chamamos tais conjuntos de "matriz",
00:37
and many of them hanging out together, "matrices".
13
37322
2737
e muitos deles juntos, "matrizes".
00:40
Matrices are everywhere.
14
40059
2561
Matrizes estĂŁo por toda parte.
00:42
They are all around us,
15
42620
1935
EstĂŁo ao redor de nĂłs,
00:44
even now in this very room.
16
44555
3336
até mesmo aqui, nesta sala.
00:47
Sorry, let's get back on track.
17
47891
1893
Desculpe, vamos voltar ao assunto.
00:49
Matrices really are everywhere, though.
18
49784
1978
Matrizes estĂŁo por toda parte.
00:51
They are used in business,
19
51762
1311
Elas sĂŁo usadas em negĂłcios,
00:53
economics,
20
53073
1125
economia,
00:54
cryptography,
21
54198
790
00:54
physics,
22
54988
1210
criptografia,
fĂ­sica,
00:56
electronics,
23
56198
1103
eletrĂŽnica
00:57
and computer graphics.
24
57301
1968
e grĂĄficos computadorizados.
00:59
One reason matrices are so cool
25
59269
2268
Uma das razÔes por que as matrizes são tão legais
01:01
is that we can pack so much information into them
26
61537
2777
é que podemos colocar tanta informação nelas
01:04
and then turn a huge series of different problems
27
64314
2274
e, então, transformar uma série enorme de diferentes problemas
01:06
into one single problem.
28
66588
2963
em um Ășnico problema.
01:09
So, to use matrices, we need to learn how they work.
29
69551
3711
Portanto, para usar matrizes, precisamos aprender como elas funcionam.
01:13
It turns out, you can treat matrices
30
73262
1910
Acontece que vocĂȘ pode tratar matrizes
01:15
just like regular numbers.
31
75172
1510
exatamente como nĂșmeros comuns.
01:16
You can add them,
32
76682
627
VocĂȘ pode somĂĄ-las,
01:17
subtract them,
33
77309
729
subtraĂ­-las,
01:18
even multiply them.
34
78038
1660
multiplicĂĄ-las.
01:19
You can't divide them,
35
79698
1217
VocĂȘ nĂŁo consegue dividi-las,
01:20
but that's a rabbit hole of its own.
36
80915
1975
mas isso Ă© outra histĂłria.
01:22
Adding matrices is pretty simple.
37
82890
2082
Somar matrizes Ă© bem simples.
01:24
All you have to do is add the corresponding entries
38
84972
2223
Tudo que vocĂȘ tem que fazer Ă© somar as entradas correspondentes
01:27
in the order they come.
39
87195
1402
na ordem em que aparecem.
01:28
So the first entries get added together,
40
88597
1860
Assim, as primeiras entradas sĂŁo somadas juntas,
01:30
the second entries,
41
90457
819
as segundas entradas,
01:31
the third,
42
91276
687
01:31
all the way down.
43
91963
1531
as terceiras,
até o final.
01:33
Of course, your matrices have to be the same size,
44
93494
2246
Claro, suas matrizes tĂȘm de ser do mesmo tamanho,
01:35
but that's pretty intuitive anyway.
45
95740
2077
mas, de qualquer forma, isso Ă© bem intuitivo.
01:37
You can also multiply the whole matrix
46
97817
2044
VocĂȘ pode tambĂ©m multiplicar toda a matriz
01:39
by a number, called a scalar.
47
99861
2346
por um nĂșmero, chamado escalar.
01:42
Just multiply every entry by that number.
48
102207
2976
Apenas multiplique cada entrada por esse nĂșmero.
01:45
But wait, there's more!
49
105183
1990
Mas, espere, hĂĄ mais!
01:47
You can actually multiply one matrix by another matrix.
50
107173
4200
Na verdade, vocĂȘ pode multiplicar uma matriz por outra matriz.
01:51
It's not like adding them, though,
51
111373
1224
NĂŁo Ă© como somĂĄ-las, contudo,
01:52
where you do it entry by entry.
52
112597
1589
quando vocĂȘ faz isso entrada por entrada.
01:54
It's more unique
53
114186
1210
É mais especial
01:55
and pretty cool once you get the hang of it.
54
115396
2070
e muito legal quando vocĂȘ pega o jeito disso.
01:57
Here's how it works.
55
117466
1150
Eis como funciona.
01:58
Let's say you have two matrices.
56
118616
2437
Digamos que vocĂȘ tem duas matrizes.
02:01
Let's make them both two by two,
57
121053
1788
Vamos distribuĂ­-las duas a duas,
02:02
meaning two rows by two columns.
58
122841
2544
quer dizer, duas fileiras e duas colunas.
02:05
Write the first matrix to the left
59
125385
2205
Escreva a primeira matriz Ă  esquerda
02:07
and the second matrix goes next to it
60
127590
1885
e a segunda matriz fica prĂłxima a ela,
02:09
and translated up a bit,
61
129475
1310
um pouquinho acima,
02:10
kind of like we are making a table.
62
130785
1791
como se estivéssemos fazendo uma tabela.
02:12
The product we get when we multiply the matrices together
63
132576
2825
O produto que obtemos quando multiplicamos as matrizes
02:15
will go right between them.
64
135401
1496
fica exatamente entre elas.
02:16
We'll also draw some gridlines to help us along.
65
136897
3744
Também vamos traçar uma grade para nos auxiliar.
02:20
Now, look at the first row of the first matrix
66
140641
3562
Bem, observe a primeira fileira da primeira matriz
02:24
and the first column of the second matrix.
67
144203
2748
e a primeira coluna da segunda matriz.
02:26
See how there's two numbers in each?
68
146951
2011
VocĂȘ vĂȘ que hĂĄ dois nĂșmeros em cada?
02:28
Multiply the first number in the row
69
148962
2457
Multiplique o primeiro nĂșmero da fileira
02:31
by the first number in the column:
70
151419
2331
pelo primeiro nĂșmero da coluna:
02:33
1 times 2 is 2.
71
153750
2180
1 vezes 2 sĂŁo 2.
02:35
Now do the next ones:
72
155930
1617
Agora faça os seguintes:
02:37
3 times 3 is 9.
73
157547
1922
3 vezes 3 sĂŁo 9.
02:39
Now add them up:
74
159469
1571
Agora some-os:
02:41
2 plus 9 is 11.
75
161040
2411
2 mais 9 sĂŁo 11.
02:43
Let's put that number in the top-left position
76
163451
2587
Vamos colocar esse nĂșmero na posição Ă  esquerda, acima
02:46
so that it matches up with the rows and columns
77
166038
2015
para que combine com as fileiras e as colunas
02:48
we used to get it.
78
168053
1255
que usamos para obtĂȘ-lo.
02:49
See how that works?
79
169308
1417
Viu como funciona?
02:50
You can do the same thing to get the other entries.
80
170725
2844
VocĂȘ faz a mesma coisa para conseguir as outras entradas.
02:53
-4 plus 0 is -4.
81
173569
4009
-4 mais 0 sĂŁo -4.
02:57
4 plus -3 is 1.
82
177578
3961
4 mais -3 sĂŁo 1.
03:01
-8 plus 0 is -8.
83
181539
3608
-8 mais 0 sĂŁo -8.
03:05
So, here's your answer.
84
185147
2236
EntĂŁo, eis a resposta.
03:07
Not all that bad, is it?
85
187383
1835
Nada mal, certo?
03:09
There's one catch, though.
86
189218
1699
Entretanto, existe uma pegadinha.
03:10
Just like with addition,
87
190917
1588
Exatamente como na adição,
03:12
your matrices have to be the right size.
88
192505
2760
as matrizes tĂȘm que ser do tamanho certo.
03:15
Look at these two matrices.
89
195265
2662
Olhe para estas duas matrizes.
03:17
2 times 8 is 16.
90
197927
2761
2 vezes 8 sĂŁo 16.
03:20
3 times 4 is 12.
91
200688
2746
3 vezes 4 sĂŁo 12.
03:23
3 times
92
203434
1675
3 vezes
03:25
wait a minute,
93
205109
1698
espere,
03:26
there are no more rows in the second matrix.
94
206807
2069
nĂŁo hĂĄ mais fileiras na segunda matriz.
03:28
We ran out of room.
95
208876
1452
Ficamos sem espaço.
03:30
So, these matrices can't be multiplied.
96
210328
2908
Assim, estas matrizes nĂŁo podem ser multiplicadas.
03:33
The number of columns in the first matrix
97
213236
2721
O nĂșmero de colunas da primeira matriz
03:35
has to be the same as the number of rows in the second matrix.
98
215957
3552
tem que ser o mesmo que o nĂșmero de colunas da segunda matriz.
03:39
As long as you're careful
99
219509
1013
Se vocĂȘ for cuidadoso
03:40
to match up your dimensions right, though,
100
220538
1847
para combinar o tamanho certo,
03:42
it's pretty easy.
101
222385
1302
Ă© bem fĂĄcil.
03:43
Understanding matrix multiplication
102
223687
1812
Entender a multiplicação de matrizes
03:45
is just the beginning, by the way.
103
225499
1491
é apenas o começo, a propósito.
03:46
There's so much you can do with them.
104
226990
1707
HĂĄ tanta coisa que vocĂȘ pode fazer com elas.
03:48
For example, let's say you want
105
228697
1802
Por exemplo, digamos que vocĂȘ queira
03:50
to encrypt a secret message.
106
230499
1922
criptografar uma mensagem secreta.
03:52
Let's say it's "Math rules".
107
232421
2167
Digamos que seja "Regras matemĂĄticas".
03:54
Though, why anybody would want to keep this a secret
108
234588
2329
Contudo, por que alguém gostaria de guardar isso em segredo,
03:56
is beyond me.
109
236917
1366
estå além de mim.
03:58
Letting numbers stand for letters,
110
238283
1358
Representando as letras com nĂșmeros,
03:59
you can put the numbers in a matrix
111
239641
1719
vocĂȘ pode colocar esses nĂșmeros em uma matriz
04:01
and then an encryption key in another.
112
241360
2544
e a chave criptogrĂĄfica em outra.
04:03
Multiply them together
113
243904
881
Multiplique-as
04:04
and you've got a new encoded matrix.
114
244785
2333
e vocĂȘ tem uma nova matriz codificada.
04:07
The only way to decode the new matrix
115
247118
2229
A Ășnica forma de decodificar a nova matriz
04:09
and read the message
116
249347
1173
e ler a mensagem
04:10
is to have the key,
117
250520
1608
Ă© tendo a chave,
04:12
that second matrix.
118
252128
1808
aquela segunda matriz.
04:13
There's even a branch of mathematics
119
253936
1436
Existe um ramo da matemĂĄtica
04:15
that uses matrices constantly,
120
255372
1858
que usa matrizes constantemente,
04:17
called Linear Algebra.
121
257230
1646
chamado ĂĄlgebra linear.
04:18
If you ever get a chance to study Linear Algebra,
122
258876
2254
Se vocĂȘ tiver uma chance de estudar ĂĄlgebra linear,
04:21
do it, it's pretty awesome.
123
261130
1836
faça isso, é bem incrível.
04:22
But just remember,
124
262966
1386
Apenas lembre-se,
04:24
once you know how to use matrices,
125
264352
2087
quando vocĂȘ sabe como usar matrizes,
04:26
you can do pretty much anything.
126
266439
2454
vocĂȘ pode fazer qualquer coisa.
Sobre este site

Este sĂ­tio irĂĄ apresentar-lhe vĂ­deos do YouTube que sĂŁo Ășteis para a aprendizagem do inglĂȘs. VerĂĄ liçÔes de inglĂȘs ensinadas por professores de primeira linha de todo o mundo. Faça duplo clique nas legendas em inglĂȘs apresentadas em cada pĂĄgina de vĂ­deo para reproduzir o vĂ­deo a partir daĂ­. As legendas deslocam-se em sincronia com a reprodução do vĂ­deo. Se tiver quaisquer comentĂĄrios ou pedidos, por favor contacte-nos utilizando este formulĂĄrio de contacto.

https://forms.gle/WvT1wiN1qDtmnspy7